CompositionContract 類別

定義

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

public ref class CompositionContract sealed
public sealed class CompositionContract
type CompositionContract = class
Public NotInheritable Class CompositionContract
繼承
CompositionContract

建構函式

CompositionContract(Type)

使用指定的合約型別,初始化 CompositionContract 類別的新執行個體。Initializes a new instance of the CompositionContract class with the specified contract type.

CompositionContract(Type, String)

使用指定的合約名稱和型別,初始化 CompositionContract 類別的新執行個體。Initializes a new instance of the CompositionContract class with the specified contract name and type.

CompositionContract(Type, String, IDictionary<String,Object>)

使用指定的合約名稱、類型和中繼資料限制式,初始化 CompositionContract 類別的新執行個體。Initializes a new instance of the CompositionContract class with the specified contract name, type, and metadata constraints.

屬性

ContractName

取得合約的名稱。Gets the name of the contract.

ContractType

取得合約類型。Gets the contract type.

MetadataConstraints

取得合約的中繼資料限制式集合。Gets a collection of metadata constraints for the contract.

方法

ChangeType(Type)

建立具有指定之類型,但名稱及限制式與此物件相同的新合約。Creates a new contract that has the specified type but the same name and constraints as this object.

Equals(Object)

判斷指定的物件是否等於這個 CompositionContract 的執行個體。Determines whether the specified object is equal to this instance of CompositionContract.

GetHashCode()

傳回此 CompositionContract 物件的雜湊碼。Returns the hash code for this CompositionContract object.

GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回此 CompositionContract 物件的字串表示。Returns the string representation of this CompositionContract object.

TryUnwrapMetadataConstraint<T>(String, T, CompositionContract)

取得具有指定之類型及名稱的中繼資料限制式 (如果存在的話)。Gets a metadata constraint that has the specified type and name, if it exists.

適用於