System.Composition.Hosting.Core Namespace

System.Composition.Hosting.Core 命名空間包含代表組合引擎核心功能的類別,包括組合作業、合約、組件相依性、匯出描述,以及共用組件的存留期內容 (用以管理其處置方式)。 The System.Composition.Hosting.Core namespace contains classes that represent core functionality of the composition engine, including composition operations, contracts, part dependencies, export descriptions, and the lifetime context of a shared part that governs how it can be disposed.

類別

CompositionContract

表示組件之間的合約,可讓組合引擎比對匯入與匯出。Represents an agreement between parts that allows the composition engine to match imports with exports.

CompositionDependency

表示組件為了滿足 ExportDescriptorPromise 而必須具備的相依性。Represents a dependency that a part must have in order to fulfill an ExportDescriptorPromise. 組合引擎在初始化期間會使用此類別,藉此決定是否可以進行組合;如果不可,則決定要提供哪些錯誤。This class is 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

允許 ExportDescriptorProvider 物件找出自身的相依性。Allows ExportDescriptorProvider objects 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

提供組合引擎已知之組件的匯出描述。Provides the description of an export for a part known to the composition engine.

LifetimeContext

代表在存留期樹狀中的節點。Represents a node in the lifetime tree.

委派

CompositeActivator

委派,允許在組合期間存取組件及匯出的執行個體。The delegate that allows instances of parts and exports to be accessed during composition.