Class RDCoreClientApp
A client-side (LSP) RDCore app.
public abstract class RDCoreClientApp : IRDCoreClientApp, IRDCoreApp, IDisposable
- Inheritance
-
RDCoreClientApp
- Implements
- Inherited Members
Remarks
🧩 Most RDCore apps are server-side, but if you were making an IDE or a CLI app, this would be your LSP app.
Constructors
RDCoreClientApp(IRDCoreLanguageServerProcess, IHealthCheckService<RDCoreClientApp>, ILanguageServerProtocolTransportLayer, ILogger<RDCoreClientApp>)
A client-side (LSP) RDCore app.
protected RDCoreClientApp(IRDCoreLanguageServerProcess serverProcess, IHealthCheckService<RDCoreClientApp> healthCheckService, ILanguageServerProtocolTransportLayer transportLayer, ILogger<RDCoreClientApp> logger)
Parameters
serverProcessIRDCoreLanguageServerProcessEncapsulates the
Processof the server application.healthCheckServiceIHealthCheckService<RDCoreClientApp>A service that monitors the server process.
transportLayerILanguageServerProtocolTransportLayerThe RDCore/LSP transport layer.
loggerILogger<RDCoreClientApp>A standard logger.
Remarks
🧩 Most RDCore apps are server-side, but if you were making an IDE or a CLI app, this would be your LSP app.
Properties
LanguageClient
The OmniSharp language client, once initialized.
public ILanguageClient LanguageClient { get; }
Property Value
Remarks
⚠️ This property will throw if used before initialization.
Exceptions
Methods
ConfigureClientCapabilities(ClientCapabilities)
protected abstract ClientCapabilities ConfigureClientCapabilities(ClientCapabilities capabilities)
Parameters
capabilitiesClientCapabilities
Returns
ConfigureHandlers(IRDCoreLSPHandlerConfigurationBuilder)
Configures OmniSharp LSP-compliant JSON-RPC handlers for any LSP 3.17 specified protocol event.
protected abstract void ConfigureHandlers(IRDCoreLSPHandlerConfigurationBuilder builder)
Parameters
builderIRDCoreLSPHandlerConfigurationBuilderA builder that lets you fluently chain repetitive calls.
Remarks
🧩 This method is invoked immediately after configuring ClientInfo and the client/server lifecycle protocol handlers:
ConfigureServices(IServiceCollection)
Configures services with the OmniSharp service collection.
protected abstract void ConfigureServices(IServiceCollection services)
Parameters
servicesIServiceCollectionThe OmniSharp internal service collection.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
protected abstract void Dispose(bool disposing)
Parameters
disposingbool
GetClientInfo()
Gets information about this LSP client application and its configuration.
protected virtual ClientInfo GetClientInfo()
Returns
Remarks
🧩 The base implementation returns the Name and Version of the executing Assembly,
which is everything ClientInfo needs.
HandleLanguageClientInitializeAsync(ILanguageClient, InitializeParams, CancellationToken)
Gives your class or handler an opportunity to interact with the InitializeParams before it is sent to the server.
protected Task HandleLanguageClientInitializeAsync(ILanguageClient client, InitializeParams request, CancellationToken cancellationToken)
Parameters
clientILanguageClientThe LSP language client.
requestInitializeParamsThe
Initializerequest payload.cancellationTokenCancellationTokenA CancellationToken for cooperative cancellation.
Returns
HandleLanguageClientInitializedAsync(ILanguageClient, InitializeParams, InitializeResult, CancellationToken)
Gives your class or handler an opportunity to interact with the InitializeParams and InitializeResult before it is processed by the client.
protected Task HandleLanguageClientInitializedAsync(ILanguageClient client, InitializeParams request, InitializeResult response, CancellationToken cancellationToken)
Parameters
clientILanguageClientrequestInitializeParamsresponseInitializeResultcancellationTokenCancellationToken
Returns
LogIfEnabled(LogLevel, string)
Logs the specified message at the specified level, if logging is enabled at that level.
public void LogIfEnabled(LogLevel logLevel, string message)
Parameters
OnLanguageClientInitializeAsync(ILanguageClient, InitializeParams, CancellationToken)
Signals the completion of the Initialize request handler.
👉 Gives your class or handler an opportunity to interact with the InitializeParams before it is sent to the server.
protected virtual Task OnLanguageClientInitializeAsync(ILanguageClient client, InitializeParams request, CancellationToken token)
Parameters
clientILanguageClientThe LSP language client.
requestInitializeParamsThe
Initializerequest payload.tokenCancellationTokenA CancellationToken for cooperative cancellation.
Returns
Remarks
🧩 This method is invoked at the end of the initialization handshake;
the base implementation logs handler completion at Trace level.
OnLanguageClientInitializedAsync(ILanguageClient, InitializeParams, InitializeResult, CancellationToken)
Signals the completion of the Initialized notification handler.
👉 Gives your class or handler an opportunity to interact with the InitializeParams and InitializeResult before it is processed by the client.
protected virtual Task OnLanguageClientInitializedAsync(ILanguageClient client, InitializeParams request, InitializeResult response, CancellationToken cancellationToken)
Parameters
clientILanguageClientrequestInitializeParamsresponseInitializeResultcancellationTokenCancellationToken
Returns
Remarks
🧩 The base implementation logs handler completion at Trace level.
OnLanguageClientStartedAsync(ILanguageClient, CancellationToken)
Gives your class or handler an opportunity to interact with the ILanguageClient after the connection has been established.
protected virtual Task OnLanguageClientStartedAsync(ILanguageClient client, CancellationToken token)
Parameters
clientILanguageClienttokenCancellationToken
Returns
Remarks
🧩 The base implementation simply logs handler completion at Trace level.
RunAsync(IServiceProvider)
Bootstraps and starts the application.
public Task RunAsync(IServiceProvider provider)
Parameters
providerIServiceProviderAn IServiceProvider to configure the application.