Class AvroSerializableAttribute
- Namespace
- AvroSharp.Serialization
- Assembly
- AvroSharp.dll
Generates an Avro schema and serializers for a partial class or record class, with the members
that types generated from .avsc files have: Schema, Write, Read, ToAvroBytes,
FromAvroBytes and IAvroWritable, IAvroReadable and, on .NET 8 and later,
IAvroSerializable<T>. The AvroSharp.Generators package provides the generator.
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public sealed class AvroSerializableAttribute : Attribute
- Inheritance
-
AvroSerializableAttribute
- Inherited Members
Remarks
The fields are the public instance properties with a getter and a setter, and the public instance fields, in declaration order (inherited ones first), except those marked AvroIgnoreAttribute.
Properties
- Doc
Gets or sets the record's
doc. The default is the type's XMLsummary, when the compilation has documentation comments.
- FieldNames
Gets or sets how member names become field names. The default is the assembly's FieldNames, or AsWritten.
- Name
Gets or sets the record's Avro name. The default is the C# type's name.
- Namespace
Gets or sets the record's Avro namespace. The default is the C# type's namespace.