IFileContextActionProvider.GetActionsAsync 方法

定义

获取适用于给定文件和上下文的操作。

public:
 System::Threading::Tasks::Task<System::Collections::Generic::IReadOnlyList<Microsoft::VisualStudio::Workspace::IFileContextAction ^> ^> ^ GetActionsAsync(System::String ^ filePath, Microsoft::VisualStudio::Workspace::FileContext ^ fileContext, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Microsoft.VisualStudio.Workspace.IFileContextAction>> GetActionsAsync (string filePath, Microsoft.VisualStudio.Workspace.FileContext fileContext, System.Threading.CancellationToken cancellationToken);
abstract member GetActionsAsync : string * Microsoft.VisualStudio.Workspace.FileContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Microsoft.VisualStudio.Workspace.IFileContextAction>>
Public Function GetActionsAsync (filePath As String, fileContext As FileContext, cancellationToken As CancellationToken) As Task(Of IReadOnlyList(Of IFileContextAction))

参数

filePath
String

正在传递的文件工作区

fileContext
FileContext

要对其执行操作的上下文。

cancellationToken
CancellationToken

可取消请求的标记。

返回

Task<IReadOnlyList<IFileContextAction>>

一个任务,其结果是可为给定文件和上下文调用的操作的列表。

适用于