Table of Contents

Method SerializeAsync

Namespace
AvroSharp.Confluent
Assembly
AvroSharp.Confluent.dll

SerializeAsync(T, SerializationContext)

Writes a value: its schema ID (registered or looked up once per subject), then its Avro encoding.

[SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Every exception goes into the returned task, as an async method's does.")]
public override Task<byte[]?> SerializeAsync(T value, SerializationContext context)

Parameters

value T

The value. A null reference is written as no message body.

context SerializationContext

The topic, the component (key or value) and the headers.

Returns

Task<byte[]>

The message body, or null for a tombstone.