Table of Contents

Class AvroValueContainerCodec

Namespace
MASES.EntityFrameworkCore.KNet.Serialization.Avro.Storage
Assembly
MASES.EntityFrameworkCore.KNet.Serialization.Avro.dll

Hand-written direct codec for AvroValueContainer and its nested PropertyDataRecord entries. Bypasses ISpecificRecord.Get(int)/Put(int, object), avoiding one boxing allocation per scalar field per property per entity.

public static class AvroValueContainerCodec
Inheritance
AvroValueContainerCodec
Inherited Members

Methods

Read<T>(Decoder, Func<T>)

Decodes T using decoder allocating objects using factory

public static T Read<T>(Decoder decoder, Func<T> factory) where T : AvroValueContainer

Parameters

decoder Decoder

The Avro.IO.Decoder instance with data

factory Func<T>

The factory used to create new object instance of T

Returns

T

A new filled instance of T

Type Parameters

T

The Type to be decoded

Write(AvroValueContainer, Encoder)

Encodes container into container

public static void Write(AvroValueContainer container, Encoder encoder)

Parameters

container AvroValueContainer

The AvroValueContainer to be written

encoder Encoder

The Avro.IO.Encoder instance used for write