Factory pattern with Managed Ext Framework (MEF)
问题 I am trying to implement Factory Pattern with MEF. Here is my solution Core Project IClass ObjectFactory static Class(This is where the problem is) Project A [Export(typeof(IClass))] [ExportMetadata("Type", "TypeA")] public classA : IClass {} ProjectB [Export(typeof(IClass))] [ExportMetadata("Type", "TypeB")] public classB : IClass {} I am facing problem when I am trying to create object dynamically And here is factory class: public static class ObjectFactory { private static readonly