The Managed Extensibility Framework (Managed Extensibility Framework, referred to as MEF), is Microsoft. NET Framework to increase application and component reusability to maximize the reuse of components. Using MEF to convert statically compiled. NET applications into dynamic combinations will be a good way to create scalable applications, extensible frameworks, and application extensions. It will be published as part of the. NET Framework 4.0. Now, the MEF will also be included in Silverlight 4.0.
So how does the MEF work? This is a simple three-step process:
Export (output)
Import (Input)
Compose (Combination)
To briefly describe how MEF works, the core of the MEF consists of a catalog and a compositioncontainer. Category is used to discover extensions, while container is used to reconcile creation and grooming dependencies. Each configurable part provides one or more export, and typically relies on one or more externally provided services or Import. Each part manages an instance that runs for the application.