Method ReadFor
- Namespace
- AvroSharp.Serialization
- Assembly
- AvroSharp.dll
ReadFor(AvroSchema)
Gets the function that reads values written with writerSchema: Read when it has the type's own encoding.
public AvroReadFunc<T> ReadFor(AvroSchema writerSchema)
Parameters
writerSchemaAvroSchemaThe schema the data was written with.
Returns
- AvroReadFunc<T>
Remarks
Schemas that can't be resolved fail here or when a value is read, depending on the type: a generated type resolves when it reads (and caches the plan); a primitive resolves here.
Exceptions
- AvroSchemaException
The schemas cannot be resolved (for a primitive, or a type whose function resolves at once).