편집

다음을 통해 공유


ReflectionModelServices.TryMakeGenericPartDefinition Method

Definition

Indicates whether a generic part definition can be specialized with the provided parameters.

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

Parameters

partDefinition
ComposablePartDefinition

The part definition.

genericParameters
IEnumerable<Type>

A collection of types to specify the generic parameters.

specialization
ComposablePartDefinition

When this method returns, contains the specialized part definition. This parameter is treated as uninitialized.

Returns

true if the specialization succeeds; otherwise, false.

Applies to