System.Composition namespaces

System.Composition namespaces

 

System.Composition and its child namespaces (System.Composition.Convention, System.Composition.Hosting, and System.Composition.Hosting.Core) contain types for developing extensible applications.

This topic displays the types in the System.Composition namespaces that can be installed and used to create Windows 8.x Store apps.

To install the following namespaces, open your project in Visual Studio 2012 or later, choose Manage NuGet Packages from the Project menu, and search online for the Microsoft.Composition package.

Types supported in the .NET for Windows 8.x Store apps

Description

CompositionContext

Provides methods to retrieve exports from the composition.

ExportAttribute

Specifies that a type, property, field, or method provides a particular export.

ExportFactory<T>

A factory that creates new instances of a part that provides the specified export.

ExportFactory<T, TMetadata>

A factory that creates new instances of a part that provides the specified export, with attached metadata.

ExportLifetimeContext<T>

Holds an exported value created by an ExportFactory<T> object and a reference to a method to release that object.

ExportMetadataAttribute

Specifies metadata for a type, property, field, or method marked with the ExportAttribute.

ImportAttribute

Specifies that a property, field, or parameter value should be provided by the CompositionContainer.object.

ImportManyAttribute

Specifies that a property, field, or parameter should be populated with all matching exports by the CompositionContainer object.

ImportMetadataConstraintAttribute

ImportingConstructorAttribute

Specifies which constructor should be used when creating a part.

MetadataAttributeAttribute

Specifies that a custom attribute’s properties provide metadata for exports applied to the same type, property, field, or method.

OnImportsSatisfiedAttribute

PartMetadataAttribute

Specifies metadata for a part.

PartNotDiscoverableAttribute

Specifies that this type’s exports won’t be included in a ComposablePartCatalog.

SharedAttribute

Marks the decorated part as being constrained to sharing within the specified boundary.

SharingBoundaryAttribute

When applied to an import of an  HYPERLINK "https://msdn.microsoft.com/en-us/library/jj637957(v=vs.110).aspx" ExportFactory<T> object, marks the boundary of a sharing scope.

Types supported in the .NET for Windows 8.x Store apps

Description

AttributedModelProvider

Provides augmented reflection data to support convention-based models.

CompositionContextExtensions

ConventionBuilder

Contains methods to define objects as MEF parts.

ExportConventionBuilder

Configures an export that is associated with a part.

ImportConventionBuilder

Configures an import that is associated with a part.

ParameterImportConventionBuilder

Represents a helper type that is used only in expressions.

PartConventionBuilder

Configures a type as a part.

PartConventionBuilder<T>

Configures a type as a part, with strongly typed return values.

Types supported in the .NET for Windows 8.x Store apps

Description

CompositionFailedException

The exception that is thrown when composition problems occur.

CompositionHost

Assembles a lightweight composition container from specified providers.

ContainerConfiguration

Configures and constructs a lightweight container.

Types supported in the .NET for Windows 8.x Store apps

Description

CompositeActivator

The delegate signature that allows instances of parts and exports to be accessed during a composition operation.

CompositionContract

Defines a standard to match exports and imports.

CompositionDependency

Describes a dependency that a part must have. Used by the composition engine during initialization to determine whether the composition can be made, and if not, what error to provide.

CompositionOperation

Represents a single composition operation.

DependencyAccessor

Allows export providers to locate their dependencies.

ExportDescriptor

Describes an export of a part known to the composition engine.

ExportDescriptorPromise

Represents an export descriptor that an available part can provide.

ExportDescriptorProvider

An object that contributes to the composition.

LifetimeContext

Represents a node in the lifetime tree.

Show:
© 2016 Microsoft