Working with MEF

MEF applications are based around a small set of core concepts: the composition container, catalog, and parts. These are both abstract concepts and a physical API that you can interact with from managed code. All the MEF classes live within the System.ComponentModel.Composition namespace and its children namespaces, such as System.ComponentModel.Composition.Hosting.

Parts

An MEF part is the primary unit of functionality. Parts have a set of features they provide (called exports); parts might also depend on features that other parts provide (termed imports).

Parts verbalize their exports and imports through contracts. At the code level, contracts are specified by using declarative attributes to declare their imports and exports ...

Get Microsoft Visual Studio 2015 Unleashed, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.