ReflectionModelServices.CreateImportDefinition Method (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.

Namespace:   System.ComponentModel.Composition.ReflectionModel
Assembly:  System.ComponentModel.Composition (in System.ComponentModel.Composition.dll)

public static ContractBasedImportDefinition CreateImportDefinition(
	LazyMemberInfo importingMember,
	string contractName,
	string requiredTypeIdentity,
	IEnumerable<KeyValuePair<string, Type>> requiredMetadata,
	ImportCardinality cardinality,
	bool isRecomposable,
	CreationPolicy requiredCreationPolicy,
	ICompositionElement origin
)

Parameters

importingMember
Type: System.ComponentModel.Composition.ReflectionModel.LazyMemberInfo

The member to import into.

contractName
Type: System.String

The contract name to use for the import.

requiredTypeIdentity
Type: System.String

The required type identity for the import.

requiredMetadata
Type: System.Collections.Generic.IEnumerable<KeyValuePair<String, Type>>

The required metadata for the import.

cardinality
Type: System.ComponentModel.Composition.Primitives.ImportCardinality

The cardinality of the import.

isRecomposable
Type: System.Boolean

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

requiredCreationPolicy
Type: System.ComponentModel.Composition.CreationPolicy

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

origin
Type: System.ComponentModel.Composition.Primitives.ICompositionElement

The object to import into.

Return Value

Type: System.ComponentModel.Composition.Primitives.ContractBasedImportDefinition

An import definition created from the specified parameters.

.NET Framework
Available since 4.0
Silverlight
Available since 4.0
Return to top
Show: