IWorkspace.GetActionsForContextsAsync 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.
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
Task<IReadOnlyList<IGrouping<Lazy<IFileContextActionProvider,IFileContextActionProviderMetadata>,IFileContextAction>>>
List of actions to apply to the file contexts