JsonMessageFormatter.DeserializeAsync 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.
Overloads
DeserializeAsync(PipeReader, CancellationToken) |
Deserializes a JsonRpcMessage. |
DeserializeAsync(PipeReader, Encoding, CancellationToken) |
Deserializes a sequence of bytes to a JsonRpcMessage. |
DeserializeAsync(PipeReader, CancellationToken)
Deserializes a JsonRpcMessage.
public System.Threading.Tasks.ValueTask<StreamJsonRpc.Protocol.JsonRpcMessage> DeserializeAsync (System.IO.Pipelines.PipeReader reader, System.Threading.CancellationToken cancellationToken);
abstract member DeserializeAsync : System.IO.Pipelines.PipeReader * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<StreamJsonRpc.Protocol.JsonRpcMessage>
override this.DeserializeAsync : System.IO.Pipelines.PipeReader * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<StreamJsonRpc.Protocol.JsonRpcMessage>
Public Function DeserializeAsync (reader As PipeReader, cancellationToken As CancellationToken) As ValueTask(Of JsonRpcMessage)
Parameters
- reader
- PipeReader
The reader to deserialize from.
- cancellationToken
- CancellationToken
A cancellation token.
Returns
The deserialized JsonRpcMessage.
Implements
Applies to
DeserializeAsync(PipeReader, Encoding, CancellationToken)
Deserializes a sequence of bytes to a JsonRpcMessage.
public System.Threading.Tasks.ValueTask<StreamJsonRpc.Protocol.JsonRpcMessage> DeserializeAsync (System.IO.Pipelines.PipeReader reader, System.Text.Encoding encoding, System.Threading.CancellationToken cancellationToken);
abstract member DeserializeAsync : System.IO.Pipelines.PipeReader * System.Text.Encoding * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<StreamJsonRpc.Protocol.JsonRpcMessage>
override this.DeserializeAsync : System.IO.Pipelines.PipeReader * System.Text.Encoding * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<StreamJsonRpc.Protocol.JsonRpcMessage>
Public Function DeserializeAsync (reader As PipeReader, encoding As Encoding, cancellationToken As CancellationToken) As ValueTask(Of JsonRpcMessage)
Parameters
- reader
- PipeReader
The reader to deserialize from.
- encoding
- Encoding
The encoding to read the bytes from reader
with. Must not be null.
- cancellationToken
- CancellationToken
A cancellation token.
Returns
The deserialized message.