Combining MEF and IoC Container

First of all, I use NInject as my IoC container and am very pleased with it - I do not want to change this. But some things I want to import using MEF. The thing is, I want the import to be created by the IoC container, since the import may depend on the things that I registered with NInject IoC.

So, I ask the question: can I somehow import the export type, so can I pass it a Ningject to create, or is there some kind of factory object that I can override in MEF?

+6
c # inversion-of-control mef
source share
1 answer

Autofac 2.1 integrates well with MEF. See this post by Nicholas Bloomhardt on how it works.

+1
source share

All Articles