MessageHandlerBase.ReadCoreAsync(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.
Reads a distinct and complete message, waiting for one if necessary.
protected abstract System.Threading.Tasks.ValueTask<StreamJsonRpc.Protocol.JsonRpcMessage> ReadCoreAsync (System.Threading.CancellationToken cancellationToken);
protected abstract System.Threading.Tasks.ValueTask<StreamJsonRpc.Protocol.JsonRpcMessage?> ReadCoreAsync (System.Threading.CancellationToken cancellationToken);
abstract member ReadCoreAsync : System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<StreamJsonRpc.Protocol.JsonRpcMessage>
Protected MustOverride Function ReadCoreAsync (cancellationToken As CancellationToken) As ValueTask(Of JsonRpcMessage)
Parameters
- cancellationToken
- CancellationToken
A token to cancel the read request.
Returns
A task whose result is the received message. A null string indicates the stream has ended. An empty string should never be returned.