ComposablePartDefinition 类

定义

定义可组合部件定义的抽象基类,可组合部件定义可描述和启用 ComposablePart 对象的创建。Defines an abstract base class for composable part definitions, which describe and enable the creation of ComposablePart objects.

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

构造函数

ComposablePartDefinition()

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

属性

ExportDefinitions

获取 ExportDefinition 对象的集合,这些对象描述由此 ComposablePartDefinition 对象定义的部件导出的对象。Gets a collection of ExportDefinition objects that describe the objects exported by the part defined by this ComposablePartDefinition object.

ImportDefinitions

获取 ImportDefinition 对象的集合,这些对象描述此 ComposablePartDefinition 对象定义的部件所需要的导入。Gets a collection of ImportDefinition objects that describe the imports required by the part defined by this ComposablePartDefinition object.

Metadata

获取此 ComposablePartDefinition 对象的元数据的集合。Gets a collection of the metadata for this ComposablePartDefinition object.

方法

CreatePart()

创建 ComposablePartDefinition 描述的部件的一个新实例。Creates a new instance of a part that the ComposablePartDefinition describes.

Equals(Object)

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

(继承自 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)
ToString()

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

(继承自 Object)

扩展方法

Exports(ComposablePartDefinition, Type)

返回指示指定的部分是否包含与指定协定类型相匹配的导出的值。Returns a value that indicates whether the specified part contains an export that matches the specified contract type.

Exports<T>(ComposablePartDefinition)

返回指示指定的部分是否包含与指定协定类型相匹配的导出的值。Returns a value that indicates whether the specified part contains an export that matches the specified contract type.

Imports(ComposablePartDefinition, Type)

返回指示指定的部分是否包含与指定协定类型相匹配的导入的值。Returns a value that indicates whether the specified part contains an import that matches the specified contract type.

Imports(ComposablePartDefinition, Type, ImportCardinality)

返回指示指定的部分是否包含与指定协定类型和导入基数相匹配的导入的值。Returns a value that indicates whether the specified part contains an import that matches the specified contract type and import cardinality.

Imports<T>(ComposablePartDefinition)

返回指示指定的部分是否包含与指定协定类型相匹配的导入的值。Returns a value that indicates whether the specified part contains an import that matches the specified contract type.

Imports<T>(ComposablePartDefinition, ImportCardinality)

返回指示指定的部分是否包含与指定协定类型和导入基数相匹配的导入的值。Returns a value that indicates whether the specified part contains an import that matches the specified contract type and import cardinality.

ContainsPartMetadata<T>(ComposablePartDefinition, String, T)

获取指示指定部分是否包含元数据的值,该数据有指定的密钥和值。Gets a value that indicates whether the specified part contains metadata that has the specified key and value.

ContainsPartMetadataWithKey(ComposablePartDefinition, String)

获取指示指定部分是否包含元数据的值,该数据有指定的密钥。Gets a value that indicates whether the specified part contains metadata that has the specified key.

Exports(ComposablePartDefinition, String)

获取指示指定部分是否导出指定协定的值。Gets a value that indicates whether the specified part exports the specified contract.

Imports(ComposablePartDefinition, String)

确定指定的部分是否导入到所指定的协定。Determines whether the specified part imports the specified contract.

Imports(ComposablePartDefinition, String, ImportCardinality)

使用指定的基数来确定指定部分是否输入到指定协定。Determines whether the specified part imports the specified contract with the specified cardinality.

适用于