Interface ISnapshotSerializer
- Namespace
- Excalibur.EventSourcing
- Assembly
- Excalibur.EventSourcing.Abstractions.dll
Provides serialization for aggregate snapshots.
public interface ISnapshotSerializer
Remarks
Implementations of this interface handle the conversion of aggregate state to and from byte arrays for storage in ISnapshotStore.
Methods
Deserialize<TState>(byte[])
Deserializes snapshot data to aggregate state.
TState Deserialize<TState>(byte[] data)
Parameters
databyte[]The snapshot data to deserialize.
Returns
- TState
The deserialized aggregate state.
Type Parameters
TStateThe type of the aggregate state.
Serialize<TState>(TState)
Serializes aggregate state to snapshot data.
byte[] Serialize<TState>(TState state)
Parameters
stateTStateThe aggregate state to serialize.
Returns
- byte[]
The serialized snapshot data.
Type Parameters
TStateThe type of the aggregate state.