IWorkspace.GetFileContextsForLanguageServicesAsync(String, CancellationToken) Метод

Определение

Возврат сопоставленного Илангуажесервицепровидер для пути к контексту файла

public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Tuple<Lazy<Microsoft.VisualStudio.Workspace.Intellisense.ILanguageServiceProvider,Microsoft.VisualStudio.Workspace.Intellisense.ILanguageServiceProviderMetadata>,System.Collections.Generic.IReadOnlyCollection<Microsoft.VisualStudio.Workspace.FileContext>>>> GetFileContextsForLanguageServicesAsync (string filePath, System.Threading.CancellationToken cancellationToken = default);
abstract member GetFileContextsForLanguageServicesAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Lazy<Microsoft.VisualStudio.Workspace.Intellisense.ILanguageServiceProvider, Microsoft.VisualStudio.Workspace.Intellisense.ILanguageServiceProviderMetadata> * System.Collections.Generic.IReadOnlyCollection<Microsoft.VisualStudio.Workspace.FileContext>>>
Public Function GetFileContextsForLanguageServicesAsync (filePath As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IReadOnlyList(Of Tuple(Of Lazy(Of ILanguageServiceProvider, ILanguageServiceProviderMetadata), IReadOnlyCollection(Of FileContext))))

Параметры

filePath
String

Абсолютный путь к файлу, который будет предоставлять контекст

cancellationToken
CancellationToken

Токен отмены

Возвращаемое значение

Task<IReadOnlyList<Tuple<Lazy<ILanguageServiceProvider,ILanguageServiceProviderMetadata>,IReadOnlyCollection<FileContext>>>>

Коллекция с соответствующими службами в контекстах файлов

Применяется к