Compartir a través de


ReflectionModelServices.CreatePartDefinition Método

Definición

Crea una definición de elemento con el tipo de elemento, las importaciones, las exportaciones, los metadatos y el origen especificados.

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

Parámetros

partType
Lazy<Type>

Tipo de elemento.

isDisposalRequired
Boolean

Es true si el elemento requiere la eliminación; de lo contrario, es false.

imports
Lazy<IEnumerable<ImportDefinition>>

Colección de las importaciones del elemento.

exports
Lazy<IEnumerable<ExportDefinition>>

Colección de las exportaciones del elemento.

metadata
Lazy<IDictionary<String,Object>>

Metadatos del elemento.

origin
ICompositionElement

Origen del elemento.

Devoluciones

Definición de elemento creada a partir de los parámetros especificados.

Se aplica a