Udostępnij za pośrednictwem


JsonMessageFormatter.DeserializeAsync Metoda

Definicja

Przeciążenia

DeserializeAsync(PipeReader, CancellationToken)

Deserializuje element JsonRpcMessage.

DeserializeAsync(PipeReader, Encoding, CancellationToken)

Deserializuje sekwencję bajtów do obiektu JsonRpcMessage.

DeserializeAsync(PipeReader, CancellationToken)

Deserializuje element 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)

Parametry

reader
PipeReader

Czytelnik do deserializacji z.

cancellationToken
CancellationToken

Token anulowania.

Zwraca

Deserializacji JsonRpcMessage.

Implementuje

Dotyczy

DeserializeAsync(PipeReader, Encoding, CancellationToken)

Deserializuje sekwencję bajtów do obiektu 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)

Parametry

reader
PipeReader

Czytelnik do deserializacji z.

encoding
Encoding

Kodowanie odczytu bajtów z reader elementu . Nie może mieć wartości null.

cancellationToken
CancellationToken

Token anulowania.

Zwraca

Deserializowany komunikat.

Implementuje

Dotyczy