Compartilhar via


NewtonsoftJsonObjectSerializer.SerializeAsync Método

Definição

Converta o valor fornecido em sua representação binária e escreva-o em Stream.

public override System.Threading.Tasks.ValueTask SerializeAsync (System.IO.Stream stream, object? value, Type inputType, System.Threading.CancellationToken cancellationToken);
override this.SerializeAsync : System.IO.Stream * obj * Type * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
Public Overrides Function SerializeAsync (stream As Stream, value As Object, inputType As Type, cancellationToken As CancellationToken) As ValueTask

Parâmetros

stream
Stream

O Stream no qual ocorrerá a gravação.

value
Object

O valor a ser convertido.

inputType
Type

O tipo do value a ser convertido.

cancellationToken
CancellationToken

O CancellationToken a ser usado durante a serialização.

Retornos

Exceções

stream ou inputType é nulo.

Aplica-se a