ReflectionModelServices.TryMakeGenericPartDefinition 方法

定义

指示泛型部件定义是否可以使用提供的参数进行专用化。

public:
 static bool TryMakeGenericPartDefinition(System::ComponentModel::Composition::Primitives::ComposablePartDefinition ^ partDefinition, System::Collections::Generic::IEnumerable<Type ^> ^ genericParameters, [Runtime::InteropServices::Out] System::ComponentModel::Composition::Primitives::ComposablePartDefinition ^ % specialization);
public static bool TryMakeGenericPartDefinition(System.ComponentModel.Composition.Primitives.ComposablePartDefinition partDefinition, System.Collections.Generic.IEnumerable<Type> genericParameters, out System.ComponentModel.Composition.Primitives.ComposablePartDefinition? specialization);
public static bool TryMakeGenericPartDefinition(System.ComponentModel.Composition.Primitives.ComposablePartDefinition partDefinition, System.Collections.Generic.IEnumerable<Type> genericParameters, out System.ComponentModel.Composition.Primitives.ComposablePartDefinition specialization);
static member TryMakeGenericPartDefinition : System.ComponentModel.Composition.Primitives.ComposablePartDefinition * seq<Type> * ComposablePartDefinition -> bool
Public Shared Function TryMakeGenericPartDefinition (partDefinition As ComposablePartDefinition, genericParameters As IEnumerable(Of Type), ByRef specialization As ComposablePartDefinition) As Boolean

参数

partDefinition
ComposablePartDefinition

部件定义。

genericParameters
IEnumerable<Type>

用于指定泛型参数的类型集合。

specialization
ComposablePartDefinition

此方法返回时,包含专用部件定义。 此参数被视为未初始化。

返回

true 如果专用化成功,则为否则,为 false.

适用于