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
decoderDecoderThe Avro.IO.Decoder instance with data
factoryFunc<T>The factory used to create new object instance of
T
Returns
- T
A new filled instance of
T
Type Parameters
TThe Type to be decoded
Write(AvroValueContainer, Encoder)
Encodes container into container
public static void Write(AvroValueContainer container, Encoder encoder)
Parameters
containerAvroValueContainerThe AvroValueContainer to be written
encoderEncoderThe Avro.IO.Encoder instance used for write