JsonRpc.SendAsync(JsonRpcMessage, CancellationToken) 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.
Sends the JSON-RPC message to IJsonRpcMessageHandler intance to be transmitted.
protected virtual System.Threading.Tasks.ValueTask SendAsync(StreamJsonRpc.Protocol.JsonRpcMessage message, System.Threading.CancellationToken cancellationToken);
abstract member SendAsync : StreamJsonRpc.Protocol.JsonRpcMessage * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
override this.SendAsync : StreamJsonRpc.Protocol.JsonRpcMessage * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
Protected Overridable Function SendAsync (message As JsonRpcMessage, cancellationToken As CancellationToken) As ValueTask
Parameters
- message
- JsonRpcMessage
The message to send.
- cancellationToken
- CancellationToken
A token to cancel the send request.
Returns
A task that represents the asynchronous operation.
Remarks
Overrides of this method are expected to call this base method for core functionality. Overrides should call the base method before any yielding await in order to maintain consistent message ordering unless the goal of the override is specifically to alter ordering of outgoing messages.