Share via


ILanguageServiceProvider.InitializeAsync Method

Definition

Initializes the language service for the specified file, or updates it with a new set of contexts.

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

Parameters

filePath
String

The absolute path of the file to initialize the language service for.

fileContexts
IReadOnlyCollection<FileContext>

The contexts available for this file.

cancellationToken
CancellationToken

A token that may cancel initialization of the language service.

Returns

A task that tracks the asynchronous operation.

Applies to