IWorkspace.GetFileContextsForLanguageServicesAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Task<IReadOnlyList<Tuple<Lazy<ILanguageServiceProvider,ILanguageServiceProviderMetadata>,IReadOnlyCollection<FileContext>>>>
Collection with matched services with it's file contexts