Table of Contents

Class AttributedPartDiscovery

Namespace
Microsoft.VisualStudio.Composition
Assembly
Microsoft.VisualStudio.Composition.dll
public class AttributedPartDiscovery : PartDiscovery
Inheritance
AttributedPartDiscovery
Inherited Members

Constructors

AttributedPartDiscovery(Resolver, bool)

public AttributedPartDiscovery(Resolver resolver, bool isNonPublicSupported = false)

Parameters

resolver Resolver
isNonPublicSupported bool

Properties

IsNonPublicSupported

Gets a value indicating whether non-public types and members will be explored.

public bool IsNonPublicSupported { get; }

Property Value

bool

Remarks

The Microsoft.Composition NuGet package ignores non-publics.

PublicVsNonPublicFlags

Gets the flags that select just public members or public and non-public as appropriate.

protected BindingFlags PublicVsNonPublicFlags { get; }

Property Value

BindingFlags

Methods

CreatePart(Type, bool)

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

protected override ComposablePartDefinition? CreatePart(Type partType, bool typeExplicitlyRequested)

Parameters

partType Type

The type to reflect over.

typeExplicitlyRequested bool

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

Returns

ComposablePartDefinition

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

GetTypes(Assembly)

Gets the types to consider for MEF parts.

protected override IEnumerable<Type> GetTypes(Assembly assembly)

Parameters

assembly Assembly

The assembly to read.

Returns

IEnumerable<Type>

A sequence of types.

IsExportFactoryType(Type)

public override bool IsExportFactoryType(Type type)

Parameters

type Type

Returns

bool