Condividi tramite


LanguageServerProvider.OnServerInitializationResultAsync Method

Definition

Method called by Visual Studio when the LSP server has completed its start-up and configuration steps, allowing the extension to handle the success and failure scenarios.

public virtual System.Threading.Tasks.Task OnServerInitializationResultAsync (Microsoft.VisualStudio.RpcContracts.LanguageServerProvider.ServerInitializationResult serverInitializationResult, Microsoft.VisualStudio.RpcContracts.LanguageServerProvider.LanguageServerInitializationFailureInfo? initializationFailureInfo, System.Threading.CancellationToken cancellationToken);
abstract member OnServerInitializationResultAsync : Microsoft.VisualStudio.RpcContracts.LanguageServerProvider.ServerInitializationResult * Microsoft.VisualStudio.RpcContracts.LanguageServerProvider.LanguageServerInitializationFailureInfo * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.OnServerInitializationResultAsync : Microsoft.VisualStudio.RpcContracts.LanguageServerProvider.ServerInitializationResult * Microsoft.VisualStudio.RpcContracts.LanguageServerProvider.LanguageServerInitializationFailureInfo * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function OnServerInitializationResultAsync (serverInitializationResult As ServerInitializationResult, initializationFailureInfo As LanguageServerInitializationFailureInfo, cancellationToken As CancellationToken) As Task

Parameters

serverInitializationResult
ServerInitializationResult

Enum denoting if the server initialization state.

initializationFailureInfo
LanguageServerInitializationFailureInfo

Nullable initialization information that contains the exception and a readable message if the serverfailed to initialize.

cancellationToken
CancellationToken

Cancellation token for this task.

Returns

A Task representing the asynchronous operation.

Applies to