Share via


ILanguageServerProviderClient.SetEnabledStateAsync Method

Definition

Method called by the language server provider infrastructure to request Visual Studio to start or stop the language server.

public System.Threading.Tasks.Task SetEnabledStateAsync (bool enabledState, System.Threading.CancellationToken cancellationToken);
abstract member SetEnabledStateAsync : bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function SetEnabledStateAsync (enabledState As Boolean, cancellationToken As CancellationToken) As Task

Parameters

enabledState
Boolean

Flag denoting if the server should be enabled or disabled by Visual Studio.

cancellationToken
CancellationToken

Cancellation token for this task.

Returns

A Task representing the asynchronous operation.

Remarks

This method only allows the server to start when needed or stops and prevents the server from starting.

Applies to