3
我可以编写一个类以使用mef导入实现特定接口的所有类型,然后在运行时指定此接口。 (我知道我需要标记与出口实施者)Mef导入实现在运行时指定的接口的所有类型
用法示例:
IEnumerable<IExcitingClass> excitingClasses = ClassImporter<IExcitingInterface>.ImportAllFrom(specifyDirectory);
这可能吗?
这就是我失踪的欢呼! – GreyCloud 2011-02-25 15:31:31