CompositionContract Class
Defines a standard to match exports and imports.
Assembly: System.Composition.Runtime (in System.Composition.Runtime.dll)
| Name | Description | |
|---|---|---|
![]() | CompositionContract(Type^) | Initializes a new instance of the CompositionContract class with the specified contract type. |
![]() | CompositionContract(Type^, String^) | Initializes a new instance of the CompositionContract class with the specified contract name and type. |
![]() | CompositionContract(Type^, String^, IDictionary<String^, Object^>^) | Initializes a new instance of the CompositionContract class with the specified contract name, type, and metadata constraints. |
| Name | Description | |
|---|---|---|
![]() | ContractName | Gets or sets the name of the contract. |
![]() | ContractType | Gets or sets the contract type. |
![]() | MetadataConstraints | Gets a collection of metadata constraints for the contract. |
| Name | Description | |
|---|---|---|
![]() | ChangeType(Type^) | Creates a new contract that has the specified type but the same name and constraints as this object. |
![]() | Equals(Object^) | Tests for equality between two contracts.(Overrides Object::Equals(Object^).) |
![]() | GetHashCode() | Returns the hash code for this CompositionContract object. (Overrides Object::GetHashCode().) |
![]() | GetType() | (Inherited from Object.) |
![]() | ToString() | Returns the string representation of this CompositionContract object.(Overrides Object::ToString().) |
![]() | TryUnwrapMetadataConstraint<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.

