Table of Contents

Constructor RecordSchema

Namespace
AvroSharp.Schemas
Assembly
AvroSharp.dll

RecordSchema(SchemaName, IEnumerable<RecordField>, string?, IEnumerable<SchemaName>?, bool, IReadOnlyDictionary<string, JsonElement>?)

Initializes a record schema.

public RecordSchema(SchemaName name, IEnumerable<RecordField> fields, string? doc = null, IEnumerable<SchemaName>? aliases = null, bool isError = false, IReadOnlyDictionary<string, JsonElement>? properties = null)

Parameters

name SchemaName

The record name.

fields IEnumerable<RecordField>

The fields; each instance may belong to only one record.

doc string

Optional documentation.

aliases IEnumerable<SchemaName>

Optional alternative names.

isError bool

true for a protocol error type.

properties IReadOnlyDictionary<string, JsonElement>

Optional custom properties.

Exceptions

AvroSchemaException

Two fields have the same name, or a field already belongs to another record.