ReflectionModelServices.CreatePartDefinition Method (Lazy<Type>, Boolean, Lazy<IEnumerable<ImportDefinition>>, Lazy<IEnumerable<ExportDefinition>>, Lazy<IDictionary<String, Object>>, ICompositionElement)

 

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.

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