ReflectionModelServices.CreateImportDefinition Method (LazyMemberInfo, String, String, IEnumerable<KeyValuePair<String, Type>>, ImportCardinality, Boolean, CreationPolicy, ICompositionElement)
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Creates an import definition for the specified member, with the specified contract name, type identity, required metadata, cardinality, recomposition policy, creation policy, and origin.
Namespace: System.ComponentModel.Composition.ReflectionModel
Assembly: System.ComponentModel.Composition (in System.ComponentModel.Composition.dll)
Syntax
'Declaration
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
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
A value that indicates whether the import is recomposable.
- requiredCreationPolicy
Type: System.ComponentModel.Composition.CreationPolicy
A value that indicates 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.
Version Information
Silverlight
Supported in: 5, 4
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.