Bagikan melalui


CompositionContract Class

Definition

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
Inheritance
CompositionContract

Constructors

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

Initializes a new instance of the CompositionContract class with the specified contract name, type, and metadata constraints.

CompositionContract(Type, String)

Initializes a new instance of the CompositionContract class with the specified contract name and type.

CompositionContract(Type)

Initializes a new instance of the CompositionContract class with the specified contract type.

Properties

ContractName

Gets the name of the contract.

ContractType

Gets the contract type.

MetadataConstraints

Gets a collection of metadata constraints for the contract.

Methods

ChangeType(Type)

Creates a new contract that has the specified type but the same name and constraints as this object.

Equals(Object)

Determines whether the specified object is equal to this instance of CompositionContract.

GetHashCode()

Returns the hash code for this CompositionContract object.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

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.

Applies to