IFileContextProvider<T>.GetContextsForFileAsync 方法

定义

获取上下文

public:
 System::Threading::Tasks::Task<System::Collections::Generic::IReadOnlyCollection<Microsoft::VisualStudio::Workspace::FileContext ^> ^> ^ GetContextsForFileAsync(System::String ^ filePath, T context, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Microsoft.VisualStudio.Workspace.FileContext>> GetContextsForFileAsync (string filePath, T context, System.Threading.CancellationToken cancellationToken);
abstract member GetContextsForFileAsync : string * 'T * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Microsoft.VisualStudio.Workspace.FileContext>>
Public Function GetContextsForFileAsync (filePath As String, context As T, cancellationToken As CancellationToken) As Task(Of IReadOnlyCollection(Of FileContext))

参数

filePath
String

上下文的文件路径

context
T

文件的上下文

cancellationToken
CancellationToken

取消令牌

返回

Task<IReadOnlyCollection<FileContext>>

文件上下文的集合

适用于