Table of Contents

Interface IRDCorePlatformChannel

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

A JSON-RPC connection to the RDCore language server, as far as its rdcore/* messages go: what a client implements over whatever carries its messages, so that RDCorePlatformClient speaks the platform's protocol through it.

public interface IRDCorePlatformChannel
Extension Methods

Remarks

The channel moves JSON and nothing else: the messages are written and read by the callers, with Options (RDCorePlatformChannelExtensions). An IDE whose own LSP client owns the connection implements it over that client's custom-message API; RDCore.SDK implements it over OmniSharp's language client, which is what rdc.exe speaks through.

A request the server answers with a JSON-RPC error faults the returned task with whatever exception the implementation raises for one; the channel adds no error model of its own.

An implementation hands the JSON on as it is: a string stays the string it is, whatever it looks like. 👉 The language server and rdc.exe read through OmniSharp, which does not keep to that for one shape of string: an ISO 8601 date and time (19 to 40 characters, a digit first, a T at the eleventh) with an offset, a Z or a fraction of a second is read as a date and written back as one, so "2026-10-30T12:34:56+02:00" arrives in the offset of the machine that read it, and "2026-10-30T12:34:56.000Z" without its fraction. A date and time with none of them, as VBA's Format writes one (yyyy-mm-ddThh:nn:ss), arrives as it was written.

Methods

OnNotification(string, Func<JsonElement?, CancellationToken, Task>)

Handles the notifications of a method the server sends the client, until the returned registration is disposed.

IDisposable OnNotification(string method, Func<JsonElement?, CancellationToken, Task> handler)

Parameters

method string

The JSON-RPC method.

handler Func<JsonElement?, CancellationToken, Task>

Handles a notification, given its params (null when it has none).

Returns

IDisposable

The registration; disposing it stops handling the method.

Remarks

A method has one handler at a time: another is registered once the registration of the first is disposed.

Exceptions

InvalidOperationException

The method is already answered or handled on this channel.

OnRequest(string, Func<JsonElement?, CancellationToken, Task<JsonElement?>>)

Answers the requests of a method the server sends the client, until the returned registration is disposed.

IDisposable OnRequest(string method, Func<JsonElement?, CancellationToken, Task<JsonElement?>> handler)

Parameters

method string

The JSON-RPC method.

handler Func<JsonElement?, CancellationToken, Task<JsonElement?>>

Answers a request: given its params (null when it has none), returns its result.

Returns

IDisposable

The registration; disposing it stops answering the method.

Remarks

A method has one handler at a time: another is registered once the registration of the first is disposed.

Exceptions

InvalidOperationException

The method is already answered or handled on this channel.

SendNotificationAsync(string, JsonElement?, CancellationToken)

Sends a notification to the server.

Task SendNotificationAsync(string method, JsonElement? parameters, CancellationToken token)

Parameters

method string

The JSON-RPC method.

parameters JsonElement?

The params of the notification; null to send none.

token CancellationToken

Cancels before the notification is sent.

Returns

Task

SendRequestAsync(string, JsonElement?, CancellationToken)

Sends a request to the server and returns its result.

Task<JsonElement?> SendRequestAsync(string method, JsonElement? parameters, CancellationToken token)

Parameters

method string

The JSON-RPC method: one of RDCorePlatformProtocol.

parameters JsonElement?

The params of the request; null to send none.

token CancellationToken

Cancels the request.

Returns

Task<JsonElement?>

The result of the response; null when it is JSON null.