Table of Contents

Interface IAvroSerializable<TSelf>

Namespace
AvroSharp.Serialization
Assembly
AvroSharp.dll

A type with generated Avro serializers, as static members, so generic code can read and write it without delegates or reflection (see AvroSerializer). Every record the AvroSharp source generator emits implements it on .NET 8 and later, when the project compiles as C# 11 or later.

public interface IAvroSerializable<TSelf> where TSelf : IAvroSerializable<TSelf>

Type Parameters

TSelf

The type itself.

Properties

Schema

Gets the type's Avro schema.

Methods

Read(ref AvroReader)

Reads a value written with the type's schema.

Read(ref AvroReader, AvroSchema)

Reads a value written with writerSchema, another version of the type's schema.

Write(ref AvroWriter, TSelf)

Writes a value.

See Also