ReflectionModelServices.CreatePartDefinition Method
Silverlight
Creates a part definition with the specified part type, imports, exports, metadata, and origin.
Namespace: System.ComponentModel.Composition.ReflectionModel
Assembly: System.ComponentModel.Composition (in System.ComponentModel.Composition.dll)
public static ComposablePartDefinition CreatePartDefinition( Lazy<Type> partType, bool isDisposalRequired, Lazy<IEnumerable<ImportDefinition>> imports, Lazy<IEnumerable<ExportDefinition>> exports, Lazy<IDictionary<string, Object>> metadata, ICompositionElement origin )
Parameters
- partType
- Type: System.Lazy<Type>
The type of the part.
- isDisposalRequired
- Type: System.Boolean
true if the part requires disposal; otherwise, false.
- imports
- Type: System.Lazy<IEnumerable<ImportDefinition>>
A collection of the part's imports.
- exports
- Type: System.Lazy<IEnumerable<ExportDefinition>>
A collection of the part's exports.
- metadata
- Type: System.Lazy<IDictionary<String, Object>>
The part's metadata.
- origin
- Type: System.ComponentModel.Composition.Primitives.ICompositionElement
The part's origin.
Return Value
Type: System.ComponentModel.Composition.Primitives.ComposablePartDefinitionA part definition created from the specified parameters.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.