Can Unity automatically resolve IEnumerable
?
Let\'s say I have a class with this constructor:
public CoalescingParserSelector(I
If you want to generally support IEnumerable, then you can add this line:
_container.RegisterType(typeof(IEnumerable<>), new InjectionFactory((IUnityContainer container, Type type, string name) => container.ResolveAll(type.GetGenericArguments().Single())));
This is he generic version of
container.RegisterType, IParserBuilder[]>();