Share via


ILanguageClient.OnLoadedAsync Method

Definition

This method is called by Visual Studio to notify the extension that the language client has been loaded. The extension can start the LSP server immediately, or wait for user action to start. To start the server call and await InvokeAsync<TEventArgs>(AsyncEventHandler<TEventArgs>, Object, TEventArgs) on the StartAsync event before returning from this method.

public:
 System::Threading::Tasks::Task ^ OnLoadedAsync();
public System.Threading.Tasks.Task OnLoadedAsync ();
abstract member OnLoadedAsync : unit -> System.Threading.Tasks.Task
Public Function OnLoadedAsync () As Task

Returns

A Task which completes when actions that need to be performed when extension is loaded are done.

Remarks

If a language client doesn't await the StartAsync call before returning from OnLoadedAsync(), it may not receive messages and notifications related to user interactions initiated before the completion of the StartAsync call.

Applies to