Export (0) Print
Expand All

ReflectionModelServices.CreatePartDefinition Method

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.ComposablePartDefinition
A part definition created from the specified parameters.

Silverlight

Supported in: 5, 4

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft