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

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

Public Member Functions

object Create (object reuse)
 Creates a new array object. The initial size of the object could be anything. More...
 
void EnsureSize (ref object array, int targetSize)
 Hint that the array should be able to handle at least targetSize elements. The array is not required to be resized More...
 
void Resize (ref object array, int targetSize)
 Resizes the array to the new value. More...
 
void AddElements (object array, int elements, int index, ReadItem itemReader, Decoder decoder, bool reuse)
 Adds elements to the given array by reading values from the decoder. More...
 

Detailed Description

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

Member Function Documentation

◆ AddElements()

void Avro.Generic.PreresolvingDatumReader< T >.ArrayAccess.AddElements ( object  array,
int  elements,
int  index,
ReadItem  itemReader,
Decoder  decoder,
bool  reuse 
)

Adds elements to the given array by reading values from the decoder.

Parameters
arrayArray to add elements to.
elementsNumber of elements to add.
indexStart adding elements to the array at this index.
itemReaderDelegate to read an item from the decoder.
decoderDecoder to read from.
reuseTrue to reuse each element in the array when deserializing. False to create a new object for each element.

◆ Create()

object Avro.Generic.PreresolvingDatumReader< T >.ArrayAccess.Create ( object  reuse)

Creates a new array object. The initial size of the object could be anything.

Parameters
reuseIf appropriate use this instead of creating a new one.
Returns
An object suitable to deserialize an avro array

◆ EnsureSize()

void Avro.Generic.PreresolvingDatumReader< T >.ArrayAccess.EnsureSize ( ref object  array,
int  targetSize 
)

Hint that the array should be able to handle at least targetSize elements. The array is not required to be resized

Parameters
arrayArray object who needs to support targetSize elements. This is guaranteed to be something returned by a previous call to CreateArray().
targetSizeThe new size.

◆ Resize()

void Avro.Generic.PreresolvingDatumReader< T >.ArrayAccess.Resize ( ref object  array,
int  targetSize 
)

Resizes the array to the new value.

Parameters
arrayArray object whose size is required. This is guaranteed to be something returned by a previous call to CreateArray().
targetSizeThe new size.

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