.net 4.0中的托管扩展性框架功能 [英] Managed Extensibility Framework feature in .net 4.0
本文介绍了.net 4.0中的托管扩展性框架功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道.net 4.0中托管可扩展性框架
功能的基本概念,其中包含小型c#示例及其优缺点。
I would like to know the basic concept of Managed Extensibility Framework feature in .net 4.0 with small c# example and its advantages and disadvantages.
问候
Patil
推荐答案
MEF有3个主要组成部分:
MEF has 3 main components:
1 - 由属性(例如Import或ImportMany)标识的插件接收器
1 - a plugin receiver, identified by attributes (such as Import or ImportMany)
2 - 使用MEF类(目录等)的插件加载器
2 - a plugin loader, which uses the MEF classes (catalogs, etc)
3 - 由属性(导出)标识的插件提供商
3 - a plugin provider, identified by attributes (export)
接收方:
[ImportMany(typeof(iMyInterface))]
private static IEnumerable<iMyInterface> _Providers;
这篇关于.net 4.0中的托管扩展性框架功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文