Don't miss out Virtual Happy Hour this Friday (April 26).
Try our conversational search powered by Generative AI!
AI OnAI Off
Don't miss out Virtual Happy Hour this Friday (April 26).
Jun 14, 2016
Jul 06, 2016
CMS Core
Closed, Fixed and tested
If an IOC registered service has a constructor with an argument that is an array or an IEnumerable, instantiation of the service might fail. The cause of the failure is that the constructor argument is retrieved as IServiceLocator.GetInstance(argumentType), instead of IServiceLocator.GetAllInstance(arrayElementType).
Workaround: Register the array or IEnumerable in an IOC container with an implementation that calls IServiceLocator.GetAllInstances.