ReflectionModelServices.TryMakeGenericPartDefinition Method (ComposablePartDefinition, IEnumerable<Type>, ComposablePartDefinition)

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

Namespace:   System.ComponentModel.Composition.ReflectionModel
Assembly:  System.ComponentModel.Composition (in System.ComponentModel.Composition.dll)

public static bool TryMakeGenericPartDefinition(
	ComposablePartDefinition partDefinition,
	IEnumerable<Type> genericParameters,
	out ComposablePartDefinition specialization
)

Parameters

partDefinition
Type: System.ComponentModel.Composition.Primitives.ComposablePartDefinition

The part definition.

genericParameters
Type: System.Collections.Generic.IEnumerable<Type>

A collection of types to specify the generic parameters.

specialization
Type: System.ComponentModel.Composition.Primitives.ComposablePartDefinition

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

Return Value

Type: System.Boolean

true if the specialization succeeds; otherwise, false.

.NET Framework
Available since 4.5
Return to top
Show: