Class AvroValueContainer<TKey>
- Namespace
- MASES.EntityFrameworkCore.KNet.Serialization.Avro.Storage
- Assembly
- MASES.EntityFrameworkCore.KNet.Serialization.Avro.dll
The default ValueContainer used from KEFCore
public class AvroValueContainer<TKey> : AvroValueContainer, ISpecificRecord, IValueContainer<TKey> where TKey : notnull
Type Parameters
TKeyIt is the key Type passed from Entity Framework associated to the Entity data will be stored in the AvroValueContainer<TKey>
- Inheritance
-
AvroValueContainer<TKey>
- Implements
-
ISpecificRecordIValueContainer<TKey>
- Inherited Members
Constructors
AvroValueContainer()
Initialize a new instance of AvroValueContainer<TKey>
public AvroValueContainer()
Remarks
It is mainly used from the JSON serializer
AvroValueContainer(IEntityType, IProperty[]?, object[])
Initialize a new instance of AvroValueContainer<TKey>
public AvroValueContainer(IEntityType tName, IProperty[]? properties, object[] rData)
Parameters
tNameIEntityTypeThe IEntityType requesting the AvroValueContainer<TKey> for
rDatapropertiesIProperty[]The set of IProperty deducted from GetProperties(), if null the implmenting instance of IValueContainer<T> shall deduct it
rDataobject[]The data, built from EFCore, to be stored in the AvroValueContainer<TKey>
Remarks
This constructor is mandatory and it is used from KEFCore to request a AvroValueContainer<TKey>
Methods
GetData(IEntityType, IProperty[]?, ref object[])
Returns back the raw data associated to the Entity contained in IValueContainer<T> instance
public void GetData(IEntityType tName, IProperty[]? properties, ref object[] array)
Parameters
tNameIEntityTypeThe requesting IEntityType to get the data back, can null if not available
propertiesIProperty[]The set of IProperty deducted from GetProperties(), if null the implmenting instance of IValueContainer<T> shall deduct it
arrayobject[]The array of object to be filled in with the data stored in the ValueContainer
GetProperties()
Returns back a dictionary of properties (PropertyName, Value) associated to the Entity
public IReadOnlyDictionary<string, object> GetProperties()
Returns
- IReadOnlyDictionary<string, object>
A dictionary of properties (PropertyName, Value) filled in with the data stored in the ValueContainer