Unity Framework: How to Instantiate two classes from the same Interface?

Posted by jerry on Stack Overflow See other posts from Stack Overflow or by jerry
Published on 2009-03-13T20:25:18Z Indexed on 2010/05/14 14:04 UTC
Read the original article Hit count: 391

Filed under:
|

I have one interface with 2 classes implementing it, I need to load each class but unity has:

m_unityContainer.Resolve() // Where is the interface IGeneric

my config looks like:

      <type type="IGeneric" mapTo="ClassA">
      </type>
      <type type="IGeneric" mapTo="ClassB">
      </type>

any ideas?

thanks

© Stack Overflow or respective owner

Related posts about unity

Related posts about inversion-of-control