Constructor PrimitiveSchema
PrimitiveSchema(AvroSchemaType, AvroLogicalType?, IReadOnlyDictionary<string, JsonElement>?)
Initializes a primitive schema.
public PrimitiveSchema(AvroSchemaType type, AvroLogicalType? logicalType = null, IReadOnlyDictionary<string, JsonElement>? properties = null)
Parameters
typeAvroSchemaTypeA primitive schema type.
logicalTypeAvroLogicalTypeAn optional logical type; it must be valid for
type.propertiesIReadOnlyDictionary<string, JsonElement>Optional custom properties.
Exceptions
- AvroSchemaException
typeis not primitive, or the logical type does not apply to it.