简体   繁体   中英

Is it possible to change how MEF creates imported objects?

I would like to use MEF to find my extensions but keep the responsibility for creating them to Ninject or a custom factory. Is that possible?

See the article: "Export Providers and Custom factories with MEF", by Glenn Block http://codebetter.com/blogs/glenn.block/archive/2008/11/30/export-providers-and-custom-factories-with-mef.aspx .

You can read some bits about possibilities to use custom factories.

In this article, you will see links to 2 other, by Matt Hawley: "MEF + Factories", and "MEF + Factories Using an Export Provider"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM