Can Unity automatically resolve IEnumerable?
Let\'s say I have a class with this constructor:
public CoalescingParserSelector(I
I believe you'll need to use the ResolveAll method and use an explicit InjectionConstructor object, i.e.:
container.RegisterType();
container.RegisterType();
var injectedBuilders = new InjectionConstructor(container.ResolveAll());
container.RegisterType(injectedBuilders);
In other words, I don't think Unity is able to automatically resolve all instances of a type and know to use constructor injection on a class with an IEnumerable parameter without an explicitly declaring an InjectionConstructor object at Run Time.
Granted I'm still learning Unity as well, but this has been my experience (YMMV).