共用方式為


CompositionContract Constructors

Definition

Overloads

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.

CompositionContract(Type)

Source:
CompositionContract.cs
Source:
CompositionContract.cs
Source:
CompositionContract.cs

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

public:
 CompositionContract(Type ^ contractType);
public CompositionContract (Type contractType);
new System.Composition.Hosting.Core.CompositionContract : Type -> System.Composition.Hosting.Core.CompositionContract
Public Sub New (contractType As Type)

Parameters

contractType
Type

The contract type.

Applies to

CompositionContract(Type, String)

Source:
CompositionContract.cs
Source:
CompositionContract.cs
Source:
CompositionContract.cs

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

public:
 CompositionContract(Type ^ contractType, System::String ^ contractName);
public CompositionContract (Type contractType, string contractName);
new System.Composition.Hosting.Core.CompositionContract : Type * string -> System.Composition.Hosting.Core.CompositionContract
Public Sub New (contractType As Type, contractName As String)

Parameters

contractType
Type

The contract type.

contractName
String

The contract name.

Applies to

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

Source:
CompositionContract.cs
Source:
CompositionContract.cs
Source:
CompositionContract.cs

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

public:
 CompositionContract(Type ^ contractType, System::String ^ contractName, System::Collections::Generic::IDictionary<System::String ^, System::Object ^> ^ metadataConstraints);
public CompositionContract (Type contractType, string contractName, System.Collections.Generic.IDictionary<string,object> metadataConstraints);
new System.Composition.Hosting.Core.CompositionContract : Type * string * System.Collections.Generic.IDictionary<string, obj> -> System.Composition.Hosting.Core.CompositionContract
Public Sub New (contractType As Type, contractName As String, metadataConstraints As IDictionary(Of String, Object))

Parameters

contractType
Type

The contract type.

contractName
String

The contract name.

metadataConstraints
IDictionary<String,Object>

A collection of metadata constraints for the contract.

Applies to