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
Properties
IsNonPublicSupported
Gets a value indicating whether non-public types and members will be explored.
public bool IsNonPublicSupported { get; }
Property Value
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
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
TypeThe type to reflect over.
typeExplicitlyRequested
boolA 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
AssemblyThe assembly to read.
Returns
- IEnumerable<Type>
A sequence of types.
IsExportFactoryType(Type)
public override bool IsExportFactoryType(Type type)
Parameters
type
Type