This project is read-only.
Moved github

Junil, Um (엄준일)
Microsoft Team System MVP Since ~2012
Blog :


MEFGeneric is a framework to support CLR Generic types in MEF (Managed Extensibility Framework).


MEF does not support open generic types. Therefore, open generic type classes cannot utilize MEF Composition. But, via MEFGeneric, changing and/or extending current MEF source code allows use of open generic types in MEF.


The following source code does not work in MEF, but using MEFGeneric, you can resolve and compose objects.

Catalog and Composition
var catalog = new AggregateCatalog(new AssemblyCatalog(Assembly.GetExecutingAssembly()));
var genericCatalog = new GenericCatalog(catalog);
var container = new CompositionContainer(genericCatalog);

Export Definition
public interface IUMC<T>
	void Say();

// Important : via only MEFGeneric, you can export definition of IUMC<> generic types.
public class UMC<T> : IUMC<T>
	#region IUMC<T> Member

	public void Say()


Container Resolving / Injection

Last edited Jun 21, 2013 at 6:19 AM by umjunil, version 24