IFileContextProvider<T>.GetContextsForFileAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取上下文
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
取消令牌
返回
文件上下文的集合