Avro C#
 All Classes Namespaces Functions Variables Enumerations Properties
Public Member Functions | Protected Member Functions
Avro.Specific.SpecificDefaultWriter Class Reference

Class for writing data from any specific objects. More...

Inheritance diagram for Avro.Specific.SpecificDefaultWriter:
Avro.Generic.DefaultWriter

List of all members.

Public Member Functions

 SpecificDefaultWriter (Schema schema)
 Constructor.

Protected Member Functions

override void WriteRecord (RecordSchema schema, object value, Encoder encoder)
 Serialized a record using the given RecordSchema. It uses GetField method to extract the field value from the given object.
override void WriteFixed (FixedSchema schema, object value, Encoder encoder)
 Validates that the record is a fixed record object and that the schema in the object is the same as the given writer schema. Writes the given fixed record into the given encoder.
override void WriteEnum (EnumSchema schema, object value, Encoder encoder)
 Writes the given enum value into the given encoder.
override void WriteArray (ArraySchema schema, object value, Encoder encoder)
 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.
override void WriteMap (MapSchema schema, object value, Encoder encoder)
 Writes the given map into the given encoder.
override void WriteUnion (UnionSchema us, object value, Encoder encoder)
 Resolves the given value against the given UnionSchema and serializes the object against the resolved schema member. The default implementation of this method uses ResolveUnion to find the member schema within the UnionSchema.
override bool Matches (Schema sc, object obj)

Detailed Description

Class for writing data from any specific objects.


Constructor & Destructor Documentation

Constructor.

Parameters:
schemaschema of the object to be written

Member Function Documentation

override void Avro.Specific.SpecificDefaultWriter.WriteArray ( ArraySchema  schema,
object  value,
Encoder  encoder 
) [inline, protected, virtual]

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.

Parameters:
schemaThe ArraySchema for serialization
valueThe value being serialized
encoderThe encoder for serialization

Reimplemented from Avro.Generic.DefaultWriter.

override void Avro.Specific.SpecificDefaultWriter.WriteEnum ( EnumSchema  schema,
object  value,
Encoder  encoder 
) [inline, protected, virtual]

Writes the given enum value into the given encoder.

Parameters:
schemawriter schema
valueenum value
encoderencoder to write to

Reimplemented from Avro.Generic.DefaultWriter.

override void Avro.Specific.SpecificDefaultWriter.WriteFixed ( FixedSchema  schema,
object  value,
Encoder  encoder 
) [inline, protected, virtual]

Validates that the record is a fixed record object and that the schema in the object is the same as the given writer schema. Writes the given fixed record into the given encoder.

Parameters:
schemawriter schema
valuefixed object to write
encoderencoder to write to

Reimplemented from Avro.Generic.DefaultWriter.

override void Avro.Specific.SpecificDefaultWriter.WriteMap ( MapSchema  schema,
object  value,
Encoder  encoder 
) [inline, protected, virtual]

Writes the given map into the given encoder.

Parameters:
schemawriter schema
valuemap to write
encoderencoder to write to

Reimplemented from Avro.Generic.DefaultWriter.

override void Avro.Specific.SpecificDefaultWriter.WriteRecord ( RecordSchema  schema,
object  value,
Encoder  encoder 
) [inline, protected, virtual]

Serialized a record using the given RecordSchema. It uses GetField method to extract the field value from the given object.

Parameters:
schemaThe RecordSchema to use for serialization
valueThe value to be serialized
encoderThe Encoder for serialization

Reimplemented from Avro.Generic.DefaultWriter.

override void Avro.Specific.SpecificDefaultWriter.WriteUnion ( UnionSchema  us,
object  value,
Encoder  encoder 
) [inline, protected, virtual]

Resolves the given value against the given UnionSchema and serializes the object against the resolved schema member. The default implementation of this method uses ResolveUnion to find the member schema within the UnionSchema.

Parameters:
usThe UnionSchema to resolve against
valueThe value to be serialized
encoderThe encoder for serialization

Reimplemented from Avro.Generic.DefaultWriter.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Properties