CompositionContract Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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) |
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. |
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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈