ReflectionModelServices.CreatePartDefinition Method

Definition

Creates a part definition with the specified part type, imports, exports, metadata, and origin.

public:
 static System::ComponentModel::Composition::Primitives::ComposablePartDefinition ^ CreatePartDefinition(Lazy<Type ^> ^ partType, bool isDisposalRequired, Lazy<System::Collections::Generic::IEnumerable<System::ComponentModel::Composition::Primitives::ImportDefinition ^> ^> ^ imports, Lazy<System::Collections::Generic::IEnumerable<System::ComponentModel::Composition::Primitives::ExportDefinition ^> ^> ^ exports, Lazy<System::Collections::Generic::IDictionary<System::String ^, System::Object ^> ^> ^ metadata, System::ComponentModel::Composition::Primitives::ICompositionElement ^ origin);
public static System.ComponentModel.Composition.Primitives.ComposablePartDefinition CreatePartDefinition (Lazy<Type> partType, bool isDisposalRequired, Lazy<System.Collections.Generic.IEnumerable<System.ComponentModel.Composition.Primitives.ImportDefinition>>? imports, Lazy<System.Collections.Generic.IEnumerable<System.ComponentModel.Composition.Primitives.ExportDefinition>>? exports, Lazy<System.Collections.Generic.IDictionary<string,object?>>? metadata, System.ComponentModel.Composition.Primitives.ICompositionElement? origin);
public static System.ComponentModel.Composition.Primitives.ComposablePartDefinition CreatePartDefinition (Lazy<Type> partType, bool isDisposalRequired, Lazy<System.Collections.Generic.IEnumerable<System.ComponentModel.Composition.Primitives.ImportDefinition>> imports, Lazy<System.Collections.Generic.IEnumerable<System.ComponentModel.Composition.Primitives.ExportDefinition>> exports, Lazy<System.Collections.Generic.IDictionary<string,object>> metadata, System.ComponentModel.Composition.Primitives.ICompositionElement origin);
static member CreatePartDefinition : Lazy<Type> * bool * Lazy<seq<System.ComponentModel.Composition.Primitives.ImportDefinition>> * Lazy<seq<System.ComponentModel.Composition.Primitives.ExportDefinition>> * Lazy<System.Collections.Generic.IDictionary<string, obj>> * System.ComponentModel.Composition.Primitives.ICompositionElement -> System.ComponentModel.Composition.Primitives.ComposablePartDefinition
Public Shared Function CreatePartDefinition (partType As Lazy(Of Type), isDisposalRequired As Boolean, imports As Lazy(Of IEnumerable(Of ImportDefinition)), exports As Lazy(Of IEnumerable(Of ExportDefinition)), metadata As Lazy(Of IDictionary(Of String, Object)), origin As ICompositionElement) As ComposablePartDefinition

Parameters

partType
Lazy<Type>

The type of the part.

isDisposalRequired
Boolean

true if the part requires disposal; otherwise, false.

imports
Lazy<IEnumerable<ImportDefinition>>

A collection of the part's imports.

exports
Lazy<IEnumerable<ExportDefinition>>

A collection of the part's exports.

metadata
Lazy<IDictionary<String,Object>>

The part's metadata.

origin
ICompositionElement

The part's origin.

Returns

A part definition created from the specified parameters.

Applies to