ComposablePart 类

定义

定义用于导入对象和生成已导出对象的可组合部件的抽象基类。Defines the abstract base class for composable parts, which import objects and produce exported objects.

public ref class ComposablePart abstract
public abstract class ComposablePart
type ComposablePart = class
Public MustInherit Class ComposablePart
继承
ComposablePart

构造函数

ComposablePart()

初始化 ComposablePart 类的新实例。Initializes a new instance of the ComposablePart class.

属性

ExportDefinitions

获取 ExportDefinition 对象的集合,这些对象描述由此部件提供的已导出对象。Gets a collection of the ExportDefinition objects that describe the exported objects provided by the part.

ImportDefinitions

获取 ImportDefinition 对象的集合,这些对象描述此部件所需的已导入对象。Gets a collection of the ImportDefinition objects that describe the imported objects required by the part.

Metadata

获取 ComposablePart 对象的元数据。Gets the metadata of the ComposablePart object.

方法

Activate()

在已设置部件的所有导入并可检索导出之后调用。Called when all the imports of the part have been set, and exports can be retrieved.

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetExportedValue(ExportDefinition)

获取由指定的 ExportDefinition 对象描述的已导出对象。Gets the exported object described by the specified ExportDefinition object.

GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
SetImport(ImportDefinition, IEnumerable<Export>)

将由指定的 ImportDefinition 对象描述的导入设置为由指定的导出来满足。Sets the import described by the specified ImportDefinition object to be satisfied by the specified exports.

ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于