次の方法で共有


System.ComponentModel.Composition Namespace

Microsoft Silverlight will reach end of support after October 2021. Learn more.

This namespace provides classes that constitute the core of the Managed Extensibility Framework, or MEF.

Classes

  Class Description
Public class AttributedModelServices Contains helper methods for using the attributed programming model with composition.
Public class ChangeRejectedException An exception that indicates whether a part has been rejected during composition.
Public class CompositionContractMismatchException The exception that is thrown when the underlying exported value or metadata of a Lazy<T> or Lazy<T, TMetadata> object cannot be cast to T or TMetadataView, respectively.
Public class CompositionError Represents an error that occurred during composition.
Public class CompositionException Represents the exception that is thrown when one or more errors occur during composition in a CompositionContainer object.
Public class CompositionInitializer Provides static access to methods for parts to satisfy imports.
Public class ExportAttribute Specifies that a type, property, field, or method provides a particular export.
Public class ExportFactory<T> Creates new instances of a part that provides the specified export.
Public class ExportFactory<T, TMetadata> Creates instances of the specified part, with attached metadata.
Public class ExportLifetimeContext<T> Holds an exported value created by an ExportFactory<T> and a reference to a method to release that object.
Public class ExportMetadataAttribute Specifies metadata for a type, property, field, or method marked with the ExportAttribute.
Public class ImportAttribute Specifies that a property, field, or parameter value should be provided by the CompositionContainer.
Public class ImportCardinalityMismatchException The exception that is thrown when the cardinality of an import is not compatible with the cardinality of the matching exports.
Public class ImportingConstructorAttribute Specifies which constructor should be used when creating a part.
Public class ImportManyAttribute Specifies that a property, field, or parameter should be populated with all matching exports by the CompositionContainer.
Public class InheritedExportAttribute Specifies that a type provides a particular export, and that subclasses of that type will also provide that export.
Public class MetadataAttributeAttribute Specifies that a custom attribute’s properties provide metadata for exports applied to the same type, property, field, or method.
Public class PartCreationPolicyAttribute Specifies the CreationPolicy for a part.
Public class PartMetadataAttribute Specifies metadata for a part.
Public class PartNotDiscoverableAttribute Specifies that this type’s exports won’t be included in a ComposablePartCatalog.

Interfaces

  Interface Description
Public interface ICompositionService Provides methods to satisfy imports on an existing part instance.
Public interface IPartImportsSatisfiedNotification Notifies a part when its imports have been satisfied.

Enumerations

  Enumeration Description
Public enumeration CreationPolicy Specifies when and how a part will be instantiated.