Resolve Interface of specific inner type of a generic

Feb 28, 2011 at 1:30 PM

Hi!

I have this:

IMyInterface mapped to

  ClassA<MyInnerClassA>

  ClassB<MyInnerClassA>

  ClassC<MyInnerClassB>

Now, I want to resolve IMyInterface, but only those objects with <MyInnerClassA>,

like container.Resolve<IMyInterface>("MyInnerClassA");

The reason is that the IMyInterface is mapped to a lot of classes and I don't want to loop all of these just to figure out which object to use..

Any hints?