Condividi tramite


IWorkspace.GetActionsForContextsAsync Method

Definition

Gets actions that apply to a set of file contexts

public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<System.Linq.IGrouping<Lazy<Microsoft.VisualStudio.Workspace.IFileContextActionProvider,Microsoft.VisualStudio.Workspace.IFileContextActionProviderMetadata>,Microsoft.VisualStudio.Workspace.IFileContextAction>>> GetActionsForContextsAsync (string filePath, System.Collections.Generic.IEnumerable<Microsoft.VisualStudio.Workspace.FileContext> fileContexts, System.Threading.CancellationToken cancellationToken = default);
abstract member GetActionsForContextsAsync : string * seq<Microsoft.VisualStudio.Workspace.FileContext> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<System.Linq.IGrouping<Lazy<Microsoft.VisualStudio.Workspace.IFileContextActionProvider, Microsoft.VisualStudio.Workspace.IFileContextActionProviderMetadata>, Microsoft.VisualStudio.Workspace.IFileContextAction>>>
Public Function GetActionsForContextsAsync (filePath As String, fileContexts As IEnumerable(Of FileContext), Optional cancellationToken As CancellationToken = Nothing) As Task(Of IReadOnlyList(Of IGrouping(Of Lazy(Of IFileContextActionProvider, IFileContextActionProviderMetadata), IFileContextAction)))

Parameters

filePath
String

File path of the target

fileContexts
IEnumerable<FileContext>

List of file contexts

cancellationToken
CancellationToken

A cancellation token.

Returns

List of actions to apply to the file contexts

Applies to