|
Avro C#
|
A typesafe wrapper around DefaultWriter. While a specific object of DefaultWriter allows the client to serialize a generic type, an object of this class allows only a single type of object to be serialized through it. More...
Public Member Functions | |
| GenericWriter (Schema schema) | |
| Initializes a new instance of the GenericWriter<T> class. More... | |
| GenericWriter (DefaultWriter writer) | |
| Initializes a new instance of the GenericWriter<T> class from a DefaultWriter. More... | |
| void | Write (T value, Encoder encoder) |
| Serializes the given object using this writer's schema. More... | |
Properties | |
| Schema | Schema [get] |
Properties inherited from Avro.Generic.DatumWriter< T > | |
| Schema | Schema [get] |
| Schema used to write the data. More... | |
A typesafe wrapper around DefaultWriter. While a specific object of DefaultWriter allows the client to serialize a generic type, an object of this class allows only a single type of object to be serialized through it.
| T | The type of object to be serialized. |
|
inline |
Initializes a new instance of the GenericWriter<T> class.
| schema | Schema to use when writing. |
|
inline |
Initializes a new instance of the GenericWriter<T> class from a DefaultWriter.
| writer | Write to initialize this new writer from. |
|
inline |
Serializes the given object using this writer's schema.
| value | The value to be serialized |
| encoder | The encoder to use for serializing |
Implements Avro.Generic.DatumWriter< T >.