Reputation: 239
I primarily use NInject as my IoC container, and is very happy with it - don't want to change that. But some things I want to import using MEF. The thing is, I want the imports to created by the IoC container as the imports can have dependencies to things that I've registered in the NInject IoC.
So, my question is: can I import the type of exports in some way, so I can hand it over to NInject for creation or is there an object factory of some kind that I can override in MEF?
Upvotes: 6
Views: 1219
Reputation: 66723
Autofac 2.1 integrates pretty well with MEF. See this post by Nicholas Blumhardt about how it works.
Upvotes: 1