Avro C#
Public Member Functions | List of all members
Avro.Generic.PreresolvingDatumWriter< T >.MapAccess Interface Reference

Defines the interface for a class that provides access to a map implementation. More...

Inheritance diagram for Avro.Generic.PreresolvingDatumWriter< T >.MapAccess:
Avro.Generic.PreresolvingDatumWriter< T >.DictionaryMapAccess

Public Member Functions

void EnsureMapObject (object value)
 Checks if the given object is a map. If it is a valid map, this function returns normally. Otherwise, it throws an exception. The default implementation checks if the value is an IDictionary<string, object>. More...
 
long GetMapSize (object value)
 Returns the size of the map object. The default implementation guarantees that EnsureMapObject has been successfully called with the given value. The default implementation requires the value to be an IDictionary<string, object> and returns the number of elements in it. More...
 
void WriteMapValues (object map, WriteItem valueWriter, Encoder encoder)
 Writes each value in the given map to the encoder using the valueWriter . The default implementation of this method requires that the map is an IDictionary<string, object>. More...
 

Detailed Description

Defines the interface for a class that provides access to a map implementation.

See also
DictionaryMapAccess

Member Function Documentation

◆ EnsureMapObject()

void Avro.Generic.PreresolvingDatumWriter< T >.MapAccess.EnsureMapObject ( object  value)

Checks if the given object is a map. If it is a valid map, this function returns normally. Otherwise, it throws an exception. The default implementation checks if the value is an IDictionary<string, object>.

Parameters
valueEnsures that this object is a valid map.

Implemented in Avro.Generic.PreresolvingDatumWriter< T >.DictionaryMapAccess.

◆ GetMapSize()

long Avro.Generic.PreresolvingDatumWriter< T >.MapAccess.GetMapSize ( object  value)

Returns the size of the map object. The default implementation guarantees that EnsureMapObject has been successfully called with the given value. The default implementation requires the value to be an IDictionary<string, object> and returns the number of elements in it.

Parameters
valueThe map object whose size is desired
Returns
The size of the given map object

Implemented in Avro.Generic.PreresolvingDatumWriter< T >.DictionaryMapAccess.

◆ WriteMapValues()

void Avro.Generic.PreresolvingDatumWriter< T >.MapAccess.WriteMapValues ( object  map,
WriteItem  valueWriter,
Encoder  encoder 
)

Writes each value in the given map to the encoder using the valueWriter . The default implementation of this method requires that the map is an IDictionary<string, object>.

Parameters
mapMap object to write the contents of.
valueWriterValue writer to send the map to.
encoderEncoder to the write the map values to.

Implemented in Avro.Generic.PreresolvingDatumWriter< T >.DictionaryMapAccess.


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