ImportDefinition 类

定义

表示 ComposablePart 对象所需要的导入。Represents an import that is required by a ComposablePart object.

public ref class ImportDefinition
public class ImportDefinition
type ImportDefinition = class
Public Class ImportDefinition
继承
ImportDefinition
派生

构造函数

ImportDefinition()

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

ImportDefinition(Expression<Func<ExportDefinition,Boolean>>, String, ImportCardinality, Boolean, Boolean)

使用指定的协定、协定名称、基数和指示导入定义是否可重新组合或是必备组件,初始化 ImportDefinition 类的新实例。Initializes a new instance of the ImportDefinition class with the specified constraint, contract name, and cardinality, and indicates whether the import definition is recomposable or a prerequisite.

ImportDefinition(Expression<Func<ExportDefinition,Boolean>>, String, ImportCardinality, Boolean, Boolean, IDictionary<String,Object>)

使用指定的协定、协定名称、基数、元数据和指示导入定义是否可重新组合或是必备组件,初始化 ImportDefinition 类的新实例。Initializes a new instance of the ImportDefinition class with the specified constraint, contract name, cardinality, and metadata, and indicates whether the import definition is recomposable or a prerequisite.

属性

Cardinality

获取导入定义所需要的导出的基数。Gets the cardinality of the exports required by the import definition.

Constraint

获取一个表达式,该表达式定义导入若要与导入定义相匹配而必须满足的条件。Gets an expression that defines conditions that the import must satisfy to match the import definition.

ContractName

获取协定的名称。Gets the name of the contract.

IsPrerequisite

获取一个值,该值指示是否必须先满足导入定义,然后部件才能开始生成导出的对象。Gets a value that indicates whether the import definition must be satisfied before a part can start producing exported objects.

IsRecomposable

获取一个值,该值指示是否可以多次满足导入定义。Gets a value that indicates whether the import definition can be satisfied multiple times.

Metadata

获取与此导入相关联的元数据。Gets the metadata associated with this import.

方法

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)
IsConstraintSatisfiedBy(ExportDefinition)

获取一个值,该值指示指定的定义所表示的导出是否满足此导入定义的约束。Gets a value that indicates whether the export represented by the specified definition satisfies the constraints of this import definition.

MemberwiseClone()

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

(继承自 Object)
ToString()

返回导入定义的字符串表示形式。Returns a string representation of the import definition.

适用于