ILanguageServerProviderClient.SetEnabledStateAsync 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.
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.