Table of Contents

Method SerializeAsync

Namespace
AvroSharp.Confluent
Assembly
AvroSharp.Confluent.dll

SerializeAsync(AvroValue, SerializationContext)

Writes a record with its schema. A null value is a tombstone: no message body.

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

Parameters

data AvroValue

The record.

context SerializationContext

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

Returns

Task<byte[]>

The message body, or null for a tombstone.

Exceptions

ArgumentException

data is not a record.