ImportDefinition Constructors
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.
Initializes a new instance of the ImportDefinition class.
Overloads
ImportDefinition() |
Initializes a new instance of the ImportDefinition class. |
ImportDefinition(Expression<Func<ExportDefinition,Boolean>>, String, ImportCardinality, Boolean, Boolean) |
Initializes a new instance of the ImportDefinition class with the specified constraint, contract name, and cardinality, and indicates whether the import definition is recomposable or a prerequisite. |
ImportDefinition(Expression<Func<ExportDefinition,Boolean>>, String, ImportCardinality, Boolean, Boolean, IDictionary<String,Object>) |
Initializes a new instance of the ImportDefinition class with the specified constraint, contract name, cardinality, and metadata, and indicates whether the import definition is recomposable or a prerequisite. |
ImportDefinition()
- Source:
- ImportDefinition.cs
- Source:
- ImportDefinition.cs
- Source:
- ImportDefinition.cs
- Source:
- ImportDefinition.cs
Initializes a new instance of the ImportDefinition class.
protected:
ImportDefinition();
protected ImportDefinition ();
Protected Sub New ()
Remarks
Derived types that call this constructor must override the Constraint property, and optionally, the Cardinality, IsPrerequisite and IsRecomposable properties.
Applies to
ImportDefinition(Expression<Func<ExportDefinition,Boolean>>, String, ImportCardinality, Boolean, Boolean)
- Source:
- ImportDefinition.cs
- Source:
- ImportDefinition.cs
- Source:
- ImportDefinition.cs
- Source:
- ImportDefinition.cs
Initializes a new instance of the ImportDefinition class with the specified constraint, contract name, and cardinality, and indicates whether the import definition is recomposable or a prerequisite.
public:
ImportDefinition(System::Linq::Expressions::Expression<Func<System::ComponentModel::Composition::Primitives::ExportDefinition ^, bool> ^> ^ constraint, System::String ^ contractName, System::ComponentModel::Composition::Primitives::ImportCardinality cardinality, bool isRecomposable, bool isPrerequisite);
public ImportDefinition (System.Linq.Expressions.Expression<Func<System.ComponentModel.Composition.Primitives.ExportDefinition,bool>> constraint, string? contractName, System.ComponentModel.Composition.Primitives.ImportCardinality cardinality, bool isRecomposable, bool isPrerequisite);
public ImportDefinition (System.Linq.Expressions.Expression<Func<System.ComponentModel.Composition.Primitives.ExportDefinition,bool>> constraint, string contractName, System.ComponentModel.Composition.Primitives.ImportCardinality cardinality, bool isRecomposable, bool isPrerequisite);
new System.ComponentModel.Composition.Primitives.ImportDefinition : System.Linq.Expressions.Expression<Func<System.ComponentModel.Composition.Primitives.ExportDefinition, bool>> * string * System.ComponentModel.Composition.Primitives.ImportCardinality * bool * bool -> System.ComponentModel.Composition.Primitives.ImportDefinition
Public Sub New (constraint As Expression(Of Func(Of ExportDefinition, Boolean)), contractName As String, cardinality As ImportCardinality, isRecomposable As Boolean, isPrerequisite As Boolean)
Parameters
- constraint
- Expression<Func<ExportDefinition,Boolean>>
An expression that contains a Func<T,TResult> object that defines the conditions an Export must match to satisfy the import definition.
- contractName
- String
The contract name.
- cardinality
- ImportCardinality
One of the enumeration values that indicates the cardinality of the Export objects required by the import definition.
- isRecomposable
- Boolean
true
to specify that the import definition can be satisfied multiple times throughout the lifetime of a ComposablePart object; otherwise, false
.
- isPrerequisite
- Boolean
true
to specify that the import definition must be satisfied before a ComposablePart can start producing exported objects; otherwise, false
.
Exceptions
constraint
is null
.
cardinality
is not one of the values of ImportCardinality.
Applies to
ImportDefinition(Expression<Func<ExportDefinition,Boolean>>, String, ImportCardinality, Boolean, Boolean, IDictionary<String,Object>)
- Source:
- ImportDefinition.cs
- Source:
- ImportDefinition.cs
- Source:
- ImportDefinition.cs
- Source:
- ImportDefinition.cs
Initializes a new instance of the ImportDefinition class with the specified constraint, contract name, cardinality, and metadata, and indicates whether the import definition is recomposable or a prerequisite.
public:
ImportDefinition(System::Linq::Expressions::Expression<Func<System::ComponentModel::Composition::Primitives::ExportDefinition ^, bool> ^> ^ constraint, System::String ^ contractName, System::ComponentModel::Composition::Primitives::ImportCardinality cardinality, bool isRecomposable, bool isPrerequisite, System::Collections::Generic::IDictionary<System::String ^, System::Object ^> ^ metadata);
public ImportDefinition (System.Linq.Expressions.Expression<Func<System.ComponentModel.Composition.Primitives.ExportDefinition,bool>> constraint, string? contractName, System.ComponentModel.Composition.Primitives.ImportCardinality cardinality, bool isRecomposable, bool isPrerequisite, System.Collections.Generic.IDictionary<string,object?>? metadata);
public ImportDefinition (System.Linq.Expressions.Expression<Func<System.ComponentModel.Composition.Primitives.ExportDefinition,bool>> constraint, string contractName, System.ComponentModel.Composition.Primitives.ImportCardinality cardinality, bool isRecomposable, bool isPrerequisite, System.Collections.Generic.IDictionary<string,object> metadata);
new System.ComponentModel.Composition.Primitives.ImportDefinition : System.Linq.Expressions.Expression<Func<System.ComponentModel.Composition.Primitives.ExportDefinition, bool>> * string * System.ComponentModel.Composition.Primitives.ImportCardinality * bool * bool * System.Collections.Generic.IDictionary<string, obj> -> System.ComponentModel.Composition.Primitives.ImportDefinition
Public Sub New (constraint As Expression(Of Func(Of ExportDefinition, Boolean)), contractName As String, cardinality As ImportCardinality, isRecomposable As Boolean, isPrerequisite As Boolean, metadata As IDictionary(Of String, Object))
Parameters
- constraint
- Expression<Func<ExportDefinition,Boolean>>
An expression that contains a Func<T,TResult> object that defines the conditions an Export must match to satisfy the import definition.
- contractName
- String
The contract name.
- cardinality
- ImportCardinality
One of the enumeration values that indicates the cardinality of the Export objects required by the import definition.
- isRecomposable
- Boolean
true
to specify that the import definition can be satisfied multiple times throughout the lifetime of a ComposablePart object; otherwise, false
.
- isPrerequisite
- Boolean
true
to specify that the import definition must be satisfied before a ComposablePart can start producing exported objects; otherwise, false
.
- metadata
- IDictionary<String,Object>
The metadata associated with the import.