Table of Contents

Class RDCoreClientApp

Namespace
RDCore.SDK.Client
Assembly
RDCore.SDK.dll

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

serverProcess IRDCoreLanguageServerProcess

Encapsulates the Process of the server application.

healthCheckService IHealthCheckService<RDCoreClientApp>

A service that monitors the server process.

transportLayer ILanguageServerProtocolTransportLayer

The RDCore/LSP transport layer.

logger ILogger<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

ILanguageClient

Remarks

⚠️ This property will throw if used before initialization.

Exceptions

LanguageServerProtocolSdkException

Methods

ConfigureClientCapabilities(ClientCapabilities)

protected abstract ClientCapabilities ConfigureClientCapabilities(ClientCapabilities capabilities)

Parameters

capabilities ClientCapabilities

Returns

ClientCapabilities

ConfigureHandlers(IRDCoreLSPHandlerConfigurationBuilder)

Configures OmniSharp LSP-compliant JSON-RPC handlers for any LSP 3.17 specified protocol event.

protected abstract void ConfigureHandlers(IRDCoreLSPHandlerConfigurationBuilder builder)

Parameters

builder IRDCoreLSPHandlerConfigurationBuilder

A 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

services IServiceCollection

The 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

disposing bool

GetClientInfo()

Gets information about this LSP client application and its configuration.

protected virtual ClientInfo GetClientInfo()

Returns

ClientInfo

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

client ILanguageClient

The LSP language client.

request InitializeParams

The Initialize request payload.

cancellationToken CancellationToken

A CancellationToken for cooperative cancellation.

Returns

Task

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

client ILanguageClient
request InitializeParams
response InitializeResult
cancellationToken CancellationToken

Returns

Task

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

logLevel LogLevel

The LogLevel for this message.

message string

The log message.

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

client ILanguageClient

The LSP language client.

request InitializeParams

The Initialize request payload.

token CancellationToken

A CancellationToken for cooperative cancellation.

Returns

Task

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

client ILanguageClient
request InitializeParams
response InitializeResult
cancellationToken CancellationToken

Returns

Task

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

client ILanguageClient
token CancellationToken

Returns

Task

Remarks

🧩 The base implementation simply logs handler completion at Trace level.

RunAsync(IServiceProvider)

Bootstraps and starts the application.

public Task RunAsync(IServiceProvider provider)

Parameters

provider IServiceProvider

An IServiceProvider to configure the application.

Returns

Task