Injecting all registered instances of a type
Posted
by James L
on Stack Overflow
See other posts from Stack Overflow
or by James L
Published on 2010-03-20T09:28:10Z
Indexed on
2010/03/20
9:31 UTC
Read the original article
Hit count: 296
I can successfully perform container.ResolveAll<IMyInterface>()
, and I get back an Enumerable containing every registered IMyInterface. However, I can't find a way to have these injected into the constructor of my class. I have tried using ResolvedArrayParameter(), but this gives me an empty enumerator. Am I doing something wrong, or could this be a bug in Unity?
© Stack Overflow or respective owner