Table of Contents

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

data byte[]

The snapshot data to deserialize.

Returns

TState

The deserialized aggregate state.

Type Parameters

TState

The type of the aggregate state.

Serialize<TState>(TState)

Serializes aggregate state to snapshot data.

byte[] Serialize<TState>(TState state)

Parameters

state TState

The aggregate state to serialize.

Returns

byte[]

The serialized snapshot data.

Type Parameters

TState

The type of the aggregate state.