Avro C#
 All Classes Namespaces Functions Variables Enumerations Properties
Classes | Public Member Functions | Protected Member Functions | List of all members
Avro.Generic.GenericDatumWriter< T > Class Template Reference

PreresolvingDatumWriter for writing data from GenericRecords or primitive types. For more information about performance considerations for choosing this implementation More...

Inheritance diagram for Avro.Generic.GenericDatumWriter< T >:
Avro.Generic.PreresolvingDatumWriter< T > Avro.Generic.DatumWriter< T >

Public Member Functions

 GenericDatumWriter (Schema schema)
 
- Public Member Functions inherited from Avro.Generic.PreresolvingDatumWriter< T >
void Write (T datum, Encoder encoder)
 

Protected Member Functions

override void WriteRecordFields (object recordObj, RecordFieldWriter[] writers, Encoder encoder)
 
override void EnsureRecordObject (RecordSchema recordSchema, object value)
 
override void WriteField (object record, string fieldName, int fieldPos, WriteItem writer, Encoder encoder)
 Extracts the field value from the given object. More...
 
override WriteItem ResolveEnum (EnumSchema es)
 Serializes an enumeration. More...
 
override void WriteFixed (FixedSchema es, object value, Encoder encoder)
 Serialized a fixed object. The default implementation requires that the value is a GenericFixed object with an identical schema as es. More...
 
override bool UnionBranchMatches (Schema sc, object obj)
 
- Protected Member Functions inherited from Avro.Generic.PreresolvingDatumWriter< T >
delegate void WriteItem (Object value, Encoder encoder)
 
 PreresolvingDatumWriter (Schema schema, ArrayAccess arrayAccess, MapAccess mapAccess)
 
void WriteNull (object value, Encoder encoder)
 Serializes a "null" More...
 
void Write< S > (object value, Schema.Type tag, Writer< S > writer)
 A generic method to serialize primitive Avro types. More...
 
WriteItem ResolveArray (ArraySchema schema)
 Serialized an array. The default implementation calls EnsureArrayObject() to ascertain that the given value is an array. It then calls GetArrayLength() and GetArrayElement() to access the members of the array and then serialize them. More...
 
void WriteMap (WriteItem itemWriter, object value, Encoder encoder)
 Serialized a map. The default implementation first ensure that the value is indeed a map and then uses GetMapSize() and GetMapElements() to access the contents of the map. More...
 
int ResolveUnion (UnionSchema us, Schema[] branchSchemas, object obj)
 Finds the branch within the given UnionSchema that matches the given object. The default implementation calls Matches() method in the order of branches within the UnionSchema. If nothing matches, throws an exception. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from Avro.Generic.PreresolvingDatumWriter< T >
static AvroException TypeMismatch (object obj, string schemaType, string type)
 
- Properties inherited from Avro.Generic.PreresolvingDatumWriter< T >
Schema Schema [get]
 
- Properties inherited from Avro.Generic.DatumWriter< T >
Schema Schema [get]
 

Detailed Description

PreresolvingDatumWriter for writing data from GenericRecords or primitive types. For more information about performance considerations for choosing this implementation

Member Function Documentation

override WriteItem Avro.Generic.GenericDatumWriter< T >.ResolveEnum ( EnumSchema  es)
inlineprotectedvirtual

Serializes an enumeration.

Parameters
esThe EnumSchema for serialization

Implements Avro.Generic.PreresolvingDatumWriter< T >.

override void Avro.Generic.GenericDatumWriter< T >.WriteField ( object  record,
string  fieldName,
int  fieldPos,
WriteItem  writer,
Encoder  encoder 
)
inlineprotectedvirtual

Extracts the field value from the given object.

Parameters
valueThe record value from which the field needs to be extracted
fieldNameThe name of the field in the record
fieldPosThe position of field in the record
Returns

Implements Avro.Generic.PreresolvingDatumWriter< T >.

override void Avro.Generic.GenericDatumWriter< T >.WriteFixed ( FixedSchema  es,
object  value,
Encoder  encoder 
)
inlineprotectedvirtual

Serialized a fixed object. The default implementation requires that the value is a GenericFixed object with an identical schema as es.

Parameters
esThe schema for serialization
valueThe value to be serialized
encoderThe encoder for serialization

Implements Avro.Generic.PreresolvingDatumWriter< T >.


The documentation for this class was generated from the following file: