Table of Contents

Method DeserializeAsync

Namespace
AvroSharp.Aws.Glue
Assembly
AvroSharp.Aws.Glue.dll

DeserializeAsync<T>(ReadOnlyMemory<byte>, CancellationToken)

Reads a message as T.

public ValueTask<T> DeserializeAsync<T>(ReadOnlyMemory<byte> message, CancellationToken cancellationToken = default)

Parameters

message ReadOnlyMemory<byte>

The message, compressed or not.

cancellationToken CancellationToken

Cancels the registry call, if one is needed.

Returns

ValueTask<T>

Type Parameters

T

The type to read: a type AvroTypes knows, GenericRecord or AvroValue.

Exceptions

AvroDataException

The message isn't in Glue Schema Registry's wire format, or its data is invalid.

InvalidOperationException

T isn't a type the serializer can read, or the schema version isn't Avro.