Edit

Share via


ReflectionModelServices.CreateImportDefinition Method

Definition

Creates an import definition for a member or parameter.

Overloads

CreateImportDefinition(Lazy<ParameterInfo>, String, String, IEnumerable<KeyValuePair<String, Type>>, ImportCardinality, CreationPolicy, ICompositionElement)

Creates an import definition for the specified parameter by using the specified contract name, type identity, import metadata, cardinality, and creation policy.

CreateImportDefinition(LazyMemberInfo, String, String, IEnumerable<KeyValuePair<String, Type>>, ImportCardinality, Boolean, CreationPolicy, ICompositionElement)

Creates an import definition for the specified member by using the specified contract name, type identity, import metadata, cardinality, recomposition policy, and creation policy.

CreateImportDefinition(Lazy<ParameterInfo>, String, String, IEnumerable<KeyValuePair<String, Type>>, ImportCardinality, CreationPolicy, IDictionary<String, Object>, Boolean, ICompositionElement)

Creates an import definition for the specified parameter by using the specified contract name, type identity, import and contract metadata, cardinality, and creation policy.

CreateImportDefinition(LazyMemberInfo, String, String, IEnumerable<KeyValuePair<String, Type>>, ImportCardinality, Boolean, CreationPolicy, IDictionary<String, Object>, Boolean, ICompositionElement)

Creates an import definition for the specified member by using the specified contract name, type identity, import and contract metadata, cardinality, recomposition policy, and creation policy.

CreateImportDefinition(LazyMemberInfo, String, String, IEnumerable<KeyValuePair<String, Type>>, ImportCardinality, Boolean, Boolean, CreationPolicy, IDictionary<String, Object>, Boolean, ICompositionElement)

Creates an import definition for the specified member by using the specified contract name, type identity, import and contract metadata, cardinality, recomposition policy, and creation policy.

CreateImportDefinition(Lazy<ParameterInfo>, String, String, IEnumerable<KeyValuePair<String, Type>>, ImportCardinality, CreationPolicy, ICompositionElement)

Source:
ReflectionModelServices.cs
Source:
ReflectionModelServices.cs
Source:
ReflectionModelServices.cs

Creates an import definition for the specified parameter by using the specified contract name, type identity, import metadata, cardinality, and creation policy.

public:
 static System::ComponentModel::Composition::Primitives::ContractBasedImportDefinition ^ CreateImportDefinition(Lazy<System::Reflection::ParameterInfo ^> ^ parameter, System::String ^ contractName, System::String ^ requiredTypeIdentity, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, Type ^>> ^ requiredMetadata, System::ComponentModel::Composition::Primitives::ImportCardinality cardinality, System::ComponentModel::Composition::CreationPolicy requiredCreationPolicy, System::ComponentModel::Composition::Primitives::ICompositionElement ^ origin);
public static System.ComponentModel.Composition.Primitives.ContractBasedImportDefinition CreateImportDefinition (Lazy<System.Reflection.ParameterInfo> parameter, string contractName, string? requiredTypeIdentity, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Type>>? requiredMetadata, System.ComponentModel.Composition.Primitives.ImportCardinality cardinality, System.ComponentModel.Composition.CreationPolicy requiredCreationPolicy, System.ComponentModel.Composition.Primitives.ICompositionElement? origin);
public static System.ComponentModel.Composition.Primitives.ContractBasedImportDefinition CreateImportDefinition (Lazy<System.Reflection.ParameterInfo> parameter, string contractName, string requiredTypeIdentity, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Type>> requiredMetadata, System.ComponentModel.Composition.Primitives.ImportCardinality cardinality, System.ComponentModel.Composition.CreationPolicy requiredCreationPolicy, System.ComponentModel.Composition.Primitives.ICompositionElement origin);
static member CreateImportDefinition : Lazy<System.Reflection.ParameterInfo> * string * string * seq<System.Collections.Generic.KeyValuePair<string, Type>> * System.ComponentModel.Composition.Primitives.ImportCardinality * System.ComponentModel.Composition.CreationPolicy * System.ComponentModel.Composition.Primitives.ICompositionElement -> System.ComponentModel.Composition.Primitives.ContractBasedImportDefinition
Public Shared Function CreateImportDefinition (parameter As Lazy(Of ParameterInfo), contractName As String, requiredTypeIdentity As String, requiredMetadata As IEnumerable(Of KeyValuePair(Of String, Type)), cardinality As ImportCardinality, requiredCreationPolicy As CreationPolicy, origin As ICompositionElement) As ContractBasedImportDefinition

Parameters

parameter
Lazy<ParameterInfo>

The parameter to import.

contractName
String

The contract name to use for the import.

requiredTypeIdentity
String

The required type identity for the import.

requiredMetadata
IEnumerable<KeyValuePair<String,Type>>

The required metadata for the import.

cardinality
ImportCardinality

The cardinality of the import.

requiredCreationPolicy
CreationPolicy

One of the enumeration values that specifies the import's creation policy.

origin
ICompositionElement

The object to import into.

Returns

An import definition created from the specified parameters.

Applies to

CreateImportDefinition(LazyMemberInfo, String, String, IEnumerable<KeyValuePair<String, Type>>, ImportCardinality, Boolean, CreationPolicy, ICompositionElement)

Source:
ReflectionModelServices.cs
Source:
ReflectionModelServices.cs
Source:
ReflectionModelServices.cs

Creates an import definition for the specified member by using the specified contract name, type identity, import metadata, cardinality, recomposition policy, and creation policy.

public:
 static System::ComponentModel::Composition::Primitives::ContractBasedImportDefinition ^ CreateImportDefinition(System::ComponentModel::Composition::ReflectionModel::LazyMemberInfo importingMember, System::String ^ contractName, System::String ^ requiredTypeIdentity, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, Type ^>> ^ requiredMetadata, System::ComponentModel::Composition::Primitives::ImportCardinality cardinality, bool isRecomposable, System::ComponentModel::Composition::CreationPolicy requiredCreationPolicy, System::ComponentModel::Composition::Primitives::ICompositionElement ^ origin);
public static System.ComponentModel.Composition.Primitives.ContractBasedImportDefinition CreateImportDefinition (System.ComponentModel.Composition.ReflectionModel.LazyMemberInfo importingMember, string contractName, string? requiredTypeIdentity, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Type>>? requiredMetadata, System.ComponentModel.Composition.Primitives.ImportCardinality cardinality, bool isRecomposable, System.ComponentModel.Composition.CreationPolicy requiredCreationPolicy, System.ComponentModel.Composition.Primitives.ICompositionElement? origin);
public static System.ComponentModel.Composition.Primitives.ContractBasedImportDefinition CreateImportDefinition (System.ComponentModel.Composition.ReflectionModel.LazyMemberInfo importingMember, string contractName, string requiredTypeIdentity, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Type>> requiredMetadata, System.ComponentModel.Composition.Primitives.ImportCardinality cardinality, bool isRecomposable, System.ComponentModel.Composition.CreationPolicy requiredCreationPolicy, System.ComponentModel.Composition.Primitives.ICompositionElement origin);
static member CreateImportDefinition : System.ComponentModel.Composition.ReflectionModel.LazyMemberInfo * string * string * seq<System.Collections.Generic.KeyValuePair<string, Type>> * System.ComponentModel.Composition.Primitives.ImportCardinality * bool * System.ComponentModel.Composition.CreationPolicy * System.ComponentModel.Composition.Primitives.ICompositionElement -> System.ComponentModel.Composition.Primitives.ContractBasedImportDefinition
Public Shared Function CreateImportDefinition (importingMember As LazyMemberInfo, contractName As String, requiredTypeIdentity As String, requiredMetadata As IEnumerable(Of KeyValuePair(Of String, Type)), cardinality As ImportCardinality, isRecomposable As Boolean, requiredCreationPolicy As CreationPolicy, origin As ICompositionElement) As ContractBasedImportDefinition

Parameters

importingMember
LazyMemberInfo

The member to import into.

contractName
String

The contract name to use for the import.

requiredTypeIdentity
String

The required type identity for the import.

requiredMetadata
IEnumerable<KeyValuePair<String,Type>>

The required metadata for the import.

cardinality
ImportCardinality

The cardinality of the import.

isRecomposable
Boolean

true to indicate that the import is recomposable; otherwise, false.

requiredCreationPolicy
CreationPolicy

One of the enumeration values that specifies the import's creation policy.

origin
ICompositionElement

The object to import into.

Returns

An import definition created from the specified parameters.

Applies to

CreateImportDefinition(Lazy<ParameterInfo>, String, String, IEnumerable<KeyValuePair<String, Type>>, ImportCardinality, CreationPolicy, IDictionary<String, Object>, Boolean, ICompositionElement)

Source:
ReflectionModelServices.cs
Source:
ReflectionModelServices.cs
Source:
ReflectionModelServices.cs

Creates an import definition for the specified parameter by using the specified contract name, type identity, import and contract metadata, cardinality, and creation policy.

public:
 static System::ComponentModel::Composition::Primitives::ContractBasedImportDefinition ^ CreateImportDefinition(Lazy<System::Reflection::ParameterInfo ^> ^ parameter, System::String ^ contractName, System::String ^ requiredTypeIdentity, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, Type ^>> ^ requiredMetadata, System::ComponentModel::Composition::Primitives::ImportCardinality cardinality, System::ComponentModel::Composition::CreationPolicy requiredCreationPolicy, System::Collections::Generic::IDictionary<System::String ^, System::Object ^> ^ metadata, bool isExportFactory, System::ComponentModel::Composition::Primitives::ICompositionElement ^ origin);
public static System.ComponentModel.Composition.Primitives.ContractBasedImportDefinition CreateImportDefinition (Lazy<System.Reflection.ParameterInfo> parameter, string contractName, string? requiredTypeIdentity, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Type>>? requiredMetadata, System.ComponentModel.Composition.Primitives.ImportCardinality cardinality, System.ComponentModel.Composition.CreationPolicy requiredCreationPolicy, System.Collections.Generic.IDictionary<string,object?> metadata, bool isExportFactory, System.ComponentModel.Composition.Primitives.ICompositionElement? origin);
public static System.ComponentModel.Composition.Primitives.ContractBasedImportDefinition CreateImportDefinition (Lazy<System.Reflection.ParameterInfo> parameter, string contractName, string requiredTypeIdentity, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Type>> requiredMetadata, System.ComponentModel.Composition.Primitives.ImportCardinality cardinality, System.ComponentModel.Composition.CreationPolicy requiredCreationPolicy, System.Collections.Generic.IDictionary<string,object> metadata, bool isExportFactory, System.ComponentModel.Composition.Primitives.ICompositionElement origin);
static member CreateImportDefinition : Lazy<System.Reflection.ParameterInfo> * string * string * seq<System.Collections.Generic.KeyValuePair<string, Type>> * System.ComponentModel.Composition.Primitives.ImportCardinality * System.ComponentModel.Composition.CreationPolicy * System.Collections.Generic.IDictionary<string, obj> * bool * System.ComponentModel.Composition.Primitives.ICompositionElement -> System.ComponentModel.Composition.Primitives.ContractBasedImportDefinition
Public Shared Function CreateImportDefinition (parameter As Lazy(Of ParameterInfo), contractName As String, requiredTypeIdentity As String, requiredMetadata As IEnumerable(Of KeyValuePair(Of String, Type)), cardinality As ImportCardinality, requiredCreationPolicy As CreationPolicy, metadata As IDictionary(Of String, Object), isExportFactory As Boolean, origin As ICompositionElement) As ContractBasedImportDefinition

Parameters

parameter
Lazy<ParameterInfo>

The parameter to import.

contractName
String

The contract name to use for the import.

requiredTypeIdentity
String

The required type identity for the import.

requiredMetadata
IEnumerable<KeyValuePair<String,Type>>

The required metadata for the import.

cardinality
ImportCardinality

The cardinality of the import.

requiredCreationPolicy
CreationPolicy

One of the enumeration values that specifies the import's creation policy.

metadata
IDictionary<String,Object>

The contract metadata.

isExportFactory
Boolean

true to indicate that the import represents an ExportFactory<T>; otherwise, false.

origin
ICompositionElement

The object to import into.

Returns

An import definition created from the specified parameters.

Applies to

CreateImportDefinition(LazyMemberInfo, String, String, IEnumerable<KeyValuePair<String, Type>>, ImportCardinality, Boolean, CreationPolicy, IDictionary<String, Object>, Boolean, ICompositionElement)

Source:
ReflectionModelServices.cs
Source:
ReflectionModelServices.cs
Source:
ReflectionModelServices.cs

Creates an import definition for the specified member by using the specified contract name, type identity, import and contract metadata, cardinality, recomposition policy, and creation policy.

public:
 static System::ComponentModel::Composition::Primitives::ContractBasedImportDefinition ^ CreateImportDefinition(System::ComponentModel::Composition::ReflectionModel::LazyMemberInfo importingMember, System::String ^ contractName, System::String ^ requiredTypeIdentity, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, Type ^>> ^ requiredMetadata, System::ComponentModel::Composition::Primitives::ImportCardinality cardinality, bool isRecomposable, System::ComponentModel::Composition::CreationPolicy requiredCreationPolicy, System::Collections::Generic::IDictionary<System::String ^, System::Object ^> ^ metadata, bool isExportFactory, System::ComponentModel::Composition::Primitives::ICompositionElement ^ origin);
public static System.ComponentModel.Composition.Primitives.ContractBasedImportDefinition CreateImportDefinition (System.ComponentModel.Composition.ReflectionModel.LazyMemberInfo importingMember, string contractName, string? requiredTypeIdentity, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Type>>? requiredMetadata, System.ComponentModel.Composition.Primitives.ImportCardinality cardinality, bool isRecomposable, System.ComponentModel.Composition.CreationPolicy requiredCreationPolicy, System.Collections.Generic.IDictionary<string,object?> metadata, bool isExportFactory, System.ComponentModel.Composition.Primitives.ICompositionElement? origin);
public static System.ComponentModel.Composition.Primitives.ContractBasedImportDefinition CreateImportDefinition (System.ComponentModel.Composition.ReflectionModel.LazyMemberInfo importingMember, string contractName, string requiredTypeIdentity, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Type>> requiredMetadata, System.ComponentModel.Composition.Primitives.ImportCardinality cardinality, bool isRecomposable, System.ComponentModel.Composition.CreationPolicy requiredCreationPolicy, System.Collections.Generic.IDictionary<string,object> metadata, bool isExportFactory, System.ComponentModel.Composition.Primitives.ICompositionElement origin);
static member CreateImportDefinition : System.ComponentModel.Composition.ReflectionModel.LazyMemberInfo * string * string * seq<System.Collections.Generic.KeyValuePair<string, Type>> * System.ComponentModel.Composition.Primitives.ImportCardinality * bool * System.ComponentModel.Composition.CreationPolicy * System.Collections.Generic.IDictionary<string, obj> * bool * System.ComponentModel.Composition.Primitives.ICompositionElement -> System.ComponentModel.Composition.Primitives.ContractBasedImportDefinition
Public Shared Function CreateImportDefinition (importingMember As LazyMemberInfo, contractName As String, requiredTypeIdentity As String, requiredMetadata As IEnumerable(Of KeyValuePair(Of String, Type)), cardinality As ImportCardinality, isRecomposable As Boolean, requiredCreationPolicy As CreationPolicy, metadata As IDictionary(Of String, Object), isExportFactory As Boolean, origin As ICompositionElement) As ContractBasedImportDefinition

Parameters

importingMember
LazyMemberInfo

The member to import into.

contractName
String

The contract name to use for the import.

requiredTypeIdentity
String

The required type identity for the import.

requiredMetadata
IEnumerable<KeyValuePair<String,Type>>

The required metadata for the import.

cardinality
ImportCardinality

The cardinality of the import.

isRecomposable
Boolean

true to indicate that the import is recomposable; otherwise, false.

requiredCreationPolicy
CreationPolicy

One of the enumeration values that specifies the import's creation policy.

metadata
IDictionary<String,Object>

The contract metadata.

isExportFactory
Boolean

true to indicate that the import represents an ExportFactory<T>; otherwise, false.

origin
ICompositionElement

The object to import into.

Returns

An import definition created from the specified parameters.

Applies to

CreateImportDefinition(LazyMemberInfo, String, String, IEnumerable<KeyValuePair<String, Type>>, ImportCardinality, Boolean, Boolean, CreationPolicy, IDictionary<String, Object>, Boolean, ICompositionElement)

Source:
ReflectionModelServices.cs
Source:
ReflectionModelServices.cs
Source:
ReflectionModelServices.cs

Creates an import definition for the specified member by using the specified contract name, type identity, import and contract metadata, cardinality, recomposition policy, and creation policy.

public:
 static System::ComponentModel::Composition::Primitives::ContractBasedImportDefinition ^ CreateImportDefinition(System::ComponentModel::Composition::ReflectionModel::LazyMemberInfo importingMember, System::String ^ contractName, System::String ^ requiredTypeIdentity, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, Type ^>> ^ requiredMetadata, System::ComponentModel::Composition::Primitives::ImportCardinality cardinality, bool isRecomposable, bool isPreRequisite, System::ComponentModel::Composition::CreationPolicy requiredCreationPolicy, System::Collections::Generic::IDictionary<System::String ^, System::Object ^> ^ metadata, bool isExportFactory, System::ComponentModel::Composition::Primitives::ICompositionElement ^ origin);
public static System.ComponentModel.Composition.Primitives.ContractBasedImportDefinition CreateImportDefinition (System.ComponentModel.Composition.ReflectionModel.LazyMemberInfo importingMember, string contractName, string? requiredTypeIdentity, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Type>>? requiredMetadata, System.ComponentModel.Composition.Primitives.ImportCardinality cardinality, bool isRecomposable, bool isPreRequisite, System.ComponentModel.Composition.CreationPolicy requiredCreationPolicy, System.Collections.Generic.IDictionary<string,object?> metadata, bool isExportFactory, System.ComponentModel.Composition.Primitives.ICompositionElement? origin);
public static System.ComponentModel.Composition.Primitives.ContractBasedImportDefinition CreateImportDefinition (System.ComponentModel.Composition.ReflectionModel.LazyMemberInfo importingMember, string contractName, string requiredTypeIdentity, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Type>> requiredMetadata, System.ComponentModel.Composition.Primitives.ImportCardinality cardinality, bool isRecomposable, bool isPreRequisite, System.ComponentModel.Composition.CreationPolicy requiredCreationPolicy, System.Collections.Generic.IDictionary<string,object> metadata, bool isExportFactory, System.ComponentModel.Composition.Primitives.ICompositionElement origin);
static member CreateImportDefinition : System.ComponentModel.Composition.ReflectionModel.LazyMemberInfo * string * string * seq<System.Collections.Generic.KeyValuePair<string, Type>> * System.ComponentModel.Composition.Primitives.ImportCardinality * bool * bool * System.ComponentModel.Composition.CreationPolicy * System.Collections.Generic.IDictionary<string, obj> * bool * System.ComponentModel.Composition.Primitives.ICompositionElement -> System.ComponentModel.Composition.Primitives.ContractBasedImportDefinition
Public Shared Function CreateImportDefinition (importingMember As LazyMemberInfo, contractName As String, requiredTypeIdentity As String, requiredMetadata As IEnumerable(Of KeyValuePair(Of String, Type)), cardinality As ImportCardinality, isRecomposable As Boolean, isPreRequisite As Boolean, requiredCreationPolicy As CreationPolicy, metadata As IDictionary(Of String, Object), isExportFactory As Boolean, origin As ICompositionElement) As ContractBasedImportDefinition

Parameters

importingMember
LazyMemberInfo

The member to import into.

contractName
String

The contract name to use for the import.

requiredTypeIdentity
String

The required type identity for the import.

requiredMetadata
IEnumerable<KeyValuePair<String,Type>>

The required metadata for the import.

cardinality
ImportCardinality

The cardinality of the import.

isRecomposable
Boolean

true to indicate that the import is recomposable; otherwise, false.

isPreRequisite
Boolean

true to indicate that the import is a prerequisite; otherwise, false.

requiredCreationPolicy
CreationPolicy

One of the enumeration values that specifies the import's creation policy.

metadata
IDictionary<String,Object>

The contract metadata.

isExportFactory
Boolean

true to indicate that the import represents an ExportFactory<T>; otherwise, false.

origin
ICompositionElement

The object to import into.

Returns

An import definition created from the specified parameters.

Applies to