Share via


PartDiscovery.CreatePart Method

Definition

Overloads

CreatePart(Type)

Reflects on a type and returns metadata on its role as a MEF part, if applicable.

CreatePart(Type, Boolean)

Reflects on a type and returns metadata on its role as a MEF part, if applicable.

CreatePart(Type)

Source:
PartDiscovery.cs
Source:
PartDiscovery.cs

Reflects on a type and returns metadata on its role as a MEF part, if applicable.

public Microsoft.VisualStudio.Composition.ComposablePartDefinition CreatePart (Type partType);
member this.CreatePart : Type -> Microsoft.VisualStudio.Composition.ComposablePartDefinition
Public Function CreatePart (partType As Type) As ComposablePartDefinition

Parameters

partType
Type

The type to reflect over.

Returns

A new instance of ComposablePartDefinition if partType represents a MEF part; otherwise null.

Applies to

CreatePart(Type, Boolean)

Source:
PartDiscovery.cs
Source:
PartDiscovery.cs

Reflects on a type and returns metadata on its role as a MEF part, if applicable.

protected abstract Microsoft.VisualStudio.Composition.ComposablePartDefinition CreatePart (Type partType, bool typeExplicitlyRequested);
abstract member CreatePart : Type * bool -> Microsoft.VisualStudio.Composition.ComposablePartDefinition
Protected MustOverride Function CreatePart (partType As Type, typeExplicitlyRequested As Boolean) As ComposablePartDefinition

Parameters

partType
Type

The type to reflect over.

typeExplicitlyRequested
Boolean

A value indicating whether this type was explicitly requested for inclusion in the catalog.

Returns

A new instance of ComposablePartDefinition if partType represents a MEF part; otherwise null.

Applies to