Autowiring collections with IoC

Posted by Marcus on Stack Overflow See other posts from Stack Overflow or by Marcus
Published on 2010-04-17T08:20:10Z Indexed on 2010/04/17 8:23 UTC
Read the original article Hit count: 388

Filed under:
|
|

Hi,

Anyone know if there exists any IoC container that can handle this:

Given:

ISomeInterfce<T> where T : Entity

Impl1 : ISomeInterfce<Entity1>

Impl2 : ISomeInterfce<Entity1>

Impl3 : ISomeInterfce<Entity2>

Impl4 : ISomeInterfce<Entity2>

I want to be able to auto wire my system and be able to resolve like this

IoC.ResolveAll(typeof(ISomeInterfce<Entity1>)) 

and get a collection back of all implementations of ISomeInterfce<Entity1>

© Stack Overflow or respective owner

Related posts about ioc

Related posts about autowire