Importing Generic with an interface

Aug 9, 2013 at 6:08 AM
I'm in the process of implementing the open generics implementation using Piotr Włodek's example at (

Everything is working fine in principle but it wont resolve my import of IRepositoryFactory<ISpecialRepository>, I think because it doesn't look at the generic type arguments and resolve the interface into the exported concrete implementation of it.

So basically what I'd like it to do is see IRepositoryFactory<> and resolve to RepositoryFactory<> (which it is doing), but also resolve ISpecialRepository to SpecialRepository. So my import of IRepositoryFactory<ISpecialRepository> would be resolved to RepositoryFactory<SpecialRepository>.

Is this a situation that makes sense? Or am I missing something fundamental. I prefer to keep my imports only on interface contracts for well known reasons.

Thanks in advance,