System.ComponentModel.Composition 命名空间

此命名空间提供构成托管扩展框架 (MEF) 的类的核心的类。 This namespace provides classes that constitute the core of the Managed Extensibility Framework, or MEF.

AdaptationConstants

包含由组合系统使用的静态元数据密钥。Contains static metadata keys used by the composition system.

AttributedModelServices

包含可将 MEF 特性化的编程模型与组合一起使用的帮助器方法。Contains helper methods for using the MEF attributed programming model with composition.

CatalogReflectionContextAttribute

当应用于 Assembly 对象时,启用 AssemblyCatalog 对象发现自定义 ReflectionContext 对象。When applied to a Assembly object, enables an AssemblyCatalog object to discover custom ReflectionContext objects.

ChangeRejectedException

一个指示部件在组合期间是否已遭拒绝的异常。An exception that indicates whether a part has been rejected during composition.

CompositionContractMismatchException

Lazy<T>Lazy<T,TMetadata> 对象的基础导出值或元数据不能分别强制转换为 TTMetadataView 时引发的异常。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.

CompositionError

表示组合期间发生的错误。Represents an error that occurred during composition.

CompositionException

表示在 CompositionContainer 对象中进行组合期间发生一个或多个错误时引发的异常。Represents the exception that is thrown when one or more errors occur during composition in a CompositionContainer object.

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>

保存 ExportFactory<T> 对象所创建的某个导出值和对方法的引用,以释放该对象。Holds an exported value created by an ExportFactory<T> object and a reference to a method to release that object.

ExportMetadataAttribute

指定带有 ExportAttribute 标记的类型、属性、字段或方法的元数据。Specifies metadata for a type, property, field, or method marked with the ExportAttribute.

ImportAttribute

指定属性、字段或参数值应由 CompositionContainer 对象提供。Specifies that a property, field, or parameter value should be provided by the CompositionContainer.object.

ImportCardinalityMismatchException

当导入的基数与匹配的导出的基数不一致时引发的异常。The exception that is thrown when the cardinality of an import is not compatible with the cardinality of the matching exports.

ImportingConstructorAttribute

指定在创建部件时应使用哪个构造函数。Specifies which constructor should be used when creating a part.

ImportManyAttribute

指定属性、字段或参数应通过 CompositionContainer 对象用所有匹配的导出进行填充。Specifies that a property, field, or parameter should be populated with all matching exports by the CompositionContainer object.

InheritedExportAttribute

指定某个类型提供特定导出,并指定此类型的子类也提供该导出。Specifies that a type provides a particular export, and that subclasses of that type will also provide that export.

MetadataAttributeAttribute

指定自定义特性的属性为应用于同一类型、属性、字段或方法的导出提供元数据。Specifies that a custom attribute's properties provide metadata for exports applied to the same type, property, field, or method.

MetadataViewImplementationAttribute

指定用于实现元数据视图的类型。Specifies the type used to implement a metadata view.

PartCreationPolicyAttribute

指定部件的 CreationPolicySpecifies the CreationPolicy for a part.

PartMetadataAttribute

指定部件的元数据。Specifies metadata for a part.

PartNotDiscoverableAttribute

指定此类型的导出不包含在 ComposablePartCatalog 中。Specifies that this type's exports won't be included in a ComposablePartCatalog.

接口

ICompositionService

提供满足现有部件实例上的导入的方法。Provides methods to satisfy imports on an existing part instance.

IPartImportsSatisfiedNotification

在满足部件的导入时通知部件。Notifies a part when its imports have been satisfied.

枚举

CreationPolicy

指定何时以及如何实例化部件。Specifies when and how a part will be instantiated.

ImportSource

指定指示的值 MEF 组合引擎如何搜索导入。Specifies values that indicate how the MEF composition engine searches for imports.