共用方式為


JsonMessageFormatter.DeserializeAsync 方法

定義

多載

DeserializeAsync(PipeReader, CancellationToken)

還原序列化 JsonRpcMessage

DeserializeAsync(PipeReader, Encoding, CancellationToken)

將位元組序列還原序列化為 JsonRpcMessage

DeserializeAsync(PipeReader, CancellationToken)

還原序列化 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)

參數

reader
PipeReader

要從中還原序列化的讀取器。

cancellationToken
CancellationToken

取消語彙基元。

傳回

已還原序列化的 JsonRpcMessage

實作

適用於

DeserializeAsync(PipeReader, Encoding, CancellationToken)

將位元組序列還原序列化為 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)

參數

reader
PipeReader

要從中還原序列化的讀取器。

encoding
Encoding

要從 reader 中讀取位元組的編碼方式。 不得為 null。

cancellationToken
CancellationToken

取消語彙基元。

傳回

還原序列化的訊息。

實作

適用於