PartDiscovery.CreatePartsAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CreatePartsAsync(Type[]) | |
CreatePartsAsync(IEnumerable<Type>, CancellationToken) | |
CreatePartsAsync(Assembly, CancellationToken) |
Reflects over an assembly and produces MEF parts for every applicable type. |
CreatePartsAsync(IEnumerable<Assembly>, IProgress<DiscoveryProgress>, CancellationToken) |
Reflects over a set of assemblies and produces MEF parts for every applicable type. |
CreatePartsAsync(IEnumerable<String>, IProgress<DiscoveryProgress>, CancellationToken) |
Reflects over a set of assemblies and produces MEF parts for every applicable type. |
CreatePartsAsync(Type[])
- Source:
- PartDiscovery.cs
- Source:
- PartDiscovery.cs
public System.Threading.Tasks.Task<Microsoft.VisualStudio.Composition.DiscoveredParts> CreatePartsAsync (params Type[] partTypes);
member this.CreatePartsAsync : Type[] -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Composition.DiscoveredParts>
Public Function CreatePartsAsync (ParamArray partTypes As Type()) As Task(Of DiscoveredParts)
Parameters
- partTypes
- Type[]
Returns
Applies to
CreatePartsAsync(IEnumerable<Type>, CancellationToken)
- Source:
- PartDiscovery.cs
- Source:
- PartDiscovery.cs
public System.Threading.Tasks.Task<Microsoft.VisualStudio.Composition.DiscoveredParts> CreatePartsAsync (System.Collections.Generic.IEnumerable<Type> partTypes, System.Threading.CancellationToken cancellationToken = default);
member this.CreatePartsAsync : seq<Type> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Composition.DiscoveredParts>
Public Function CreatePartsAsync (partTypes As IEnumerable(Of Type), Optional cancellationToken As CancellationToken = Nothing) As Task(Of DiscoveredParts)
Parameters
- partTypes
- IEnumerable<Type>
- cancellationToken
- CancellationToken
Returns
Applies to
CreatePartsAsync(Assembly, CancellationToken)
- Source:
- PartDiscovery.cs
- Source:
- PartDiscovery.cs
Reflects over an assembly and produces MEF parts for every applicable type.
public System.Threading.Tasks.Task<Microsoft.VisualStudio.Composition.DiscoveredParts> CreatePartsAsync (System.Reflection.Assembly assembly, System.Threading.CancellationToken cancellationToken = default);
member this.CreatePartsAsync : System.Reflection.Assembly * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Composition.DiscoveredParts>
Public Function CreatePartsAsync (assembly As Assembly, Optional cancellationToken As CancellationToken = Nothing) As Task(Of DiscoveredParts)
Parameters
- assembly
- Assembly
The assembly to search for MEF parts.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
A set of generated parts.
Applies to
CreatePartsAsync(IEnumerable<Assembly>, IProgress<DiscoveryProgress>, CancellationToken)
- Source:
- PartDiscovery.cs
- Source:
- PartDiscovery.cs
Reflects over a set of assemblies and produces MEF parts for every applicable type.
public System.Threading.Tasks.Task<Microsoft.VisualStudio.Composition.DiscoveredParts> CreatePartsAsync (System.Collections.Generic.IEnumerable<System.Reflection.Assembly> assemblies, IProgress<Microsoft.VisualStudio.Composition.DiscoveryProgress> progress = default, System.Threading.CancellationToken cancellationToken = default);
member this.CreatePartsAsync : seq<System.Reflection.Assembly> * IProgress<Microsoft.VisualStudio.Composition.DiscoveryProgress> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Composition.DiscoveredParts>
Public Function CreatePartsAsync (assemblies As IEnumerable(Of Assembly), Optional progress As IProgress(Of DiscoveryProgress) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of DiscoveredParts)
Parameters
- assemblies
- IEnumerable<Assembly>
The assemblies to search for MEF parts.
- progress
- IProgress<DiscoveryProgress>
An optional way to receive progress updates on how discovery is progressing.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
A set of generated parts.
Applies to
CreatePartsAsync(IEnumerable<String>, IProgress<DiscoveryProgress>, CancellationToken)
- Source:
- PartDiscovery.cs
- Source:
- PartDiscovery.cs
Reflects over a set of assemblies and produces MEF parts for every applicable type.
public System.Threading.Tasks.Task<Microsoft.VisualStudio.Composition.DiscoveredParts> CreatePartsAsync (System.Collections.Generic.IEnumerable<string> assemblyPaths, IProgress<Microsoft.VisualStudio.Composition.DiscoveryProgress> progress = default, System.Threading.CancellationToken cancellationToken = default);
member this.CreatePartsAsync : seq<string> * IProgress<Microsoft.VisualStudio.Composition.DiscoveryProgress> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Composition.DiscoveredParts>
Public Function CreatePartsAsync (assemblyPaths As IEnumerable(Of String), Optional progress As IProgress(Of DiscoveryProgress) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of DiscoveredParts)
Parameters
- assemblyPaths
- IEnumerable<String>
The paths to assemblies to search for MEF parts.
- progress
- IProgress<DiscoveryProgress>
An optional way to receive progress updates on how discovery is progressing.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
A set of generated parts.