Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CompositionContract Class

.NET Framework (current version)
 

Defines a standard to match exports and imports.

Namespace:   System.Composition.Hosting.Core
Assembly:  System.Composition.Runtime (in System.Composition.Runtime.dll)

System::Object
  System.Composition.Hosting.Core::CompositionContract

public ref class CompositionContract sealed 

NameDescription
System_CAPS_pubmethodCompositionContract(Type^)

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

System_CAPS_pubmethodCompositionContract(Type^, String^)

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

System_CAPS_pubmethodCompositionContract(Type^, String^, IDictionary<String^, Object^>^)

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

NameDescription
System_CAPS_pubpropertyContractName

Gets or sets the name of the contract.

System_CAPS_pubpropertyContractType

Gets or sets the contract type.

System_CAPS_pubpropertyMetadataConstraints

Gets a collection of metadata constraints for the contract.

NameDescription
System_CAPS_pubmethodChangeType(Type^)

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

System_CAPS_pubmethodEquals(Object^)

Tests for equality between two contracts.(Overrides Object::Equals(Object^).)

System_CAPS_pubmethodGetHashCode()

Returns the hash code for this CompositionContract object. (Overrides Object::GetHashCode().)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns the string representation of this CompositionContract object.(Overrides Object::ToString().)

System_CAPS_pubmethodTryUnwrapMetadataConstraint<T>(String^, T%, CompositionContract^%)

Gets a metadata constraint that has the specified type and name, if it exists.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2017 Microsoft