Поделиться через


ReflectionModelServices.CreatePartDefinition Метод

Определение

Создает определение части, используя заданные тип части, импорты, экспорты, метаданные и источник.

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

Параметры

partType
Lazy<Type>

Тип части.

isDisposalRequired
Boolean

Значение true, если для части требуется ликвидация, в противном случае — значение false.

imports
Lazy<IEnumerable<ImportDefinition>>

Коллекция импортов части.

exports
Lazy<IEnumerable<ExportDefinition>>

Коллекция экспортов части.

metadata
Lazy<IDictionary<String,Object>>

Метаданные части.

origin
ICompositionElement

Источник части.

Возвращаемое значение

Определение части, созданное на основе заданных параметров.

Применяется к