using System; using ZeroLevel.Services.PartitionStorage.Interfaces; using ZeroLevel.Services.Serialization; namespace ZeroLevel.Services.PartitionStorage { // TODO INTERNAL public sealed class StoreStandartSerializer : IStoreSerializer { private readonly Action _keySerializer; private readonly Action _inputSerializer; private readonly Func _keyDeserializer; private readonly Func _inputDeserializer; private readonly Func _valueDeserializer; public StoreStandartSerializer() { _keySerializer = MessageSerializer.GetSerializer(); _inputSerializer = MessageSerializer.GetSerializer(); _keyDeserializer = MessageSerializer.GetDeserializer(); _inputDeserializer = MessageSerializer.GetDeserializer(); _valueDeserializer = MessageSerializer.GetDeserializer(); } public Action KeySerializer => _keySerializer; public Action InputSerializer => _inputSerializer; public Func KeyDeserializer => _keyDeserializer; public Func InputDeserializer => _inputDeserializer; public Func ValueDeserializer => _valueDeserializer; } }