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

  array | Array to add elements to.
  elements | Number of elements to add.
  index | Start adding elements to the array at this index.
  itemReader | Delegate to read an item from the decoder.
  decoder | Decoder to read from.
  reuse | True 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

  reuse | If 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

  array | Array object who needs to support targetSize elements. This is guaranteed to be something returned by a previous call to CreateArray().
  targetSize | The new size.

## ◆ Resize()

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

Resizes the array to the new value.

Parameters

  array | Array object whose size is required. This is guaranteed to be something returned by a previous call to CreateArray().
  targetSize | The new size.

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

- src/apache/main/Generic/PreresolvingDatumReader.cs