Compartir a través de


IWorkspace.GetFileContextsForLanguageServicesAsync Method

Definition

Return matched ILanguageServiceProvider's for a file context path

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))))

Parameters

filePath
String

Absolute path of the file which will provide the context

cancellationToken
CancellationToken

Cancellation token

Returns

Collection with matched services with it's file contexts

Applies to