Interface ICheckpointStore
Infrastructure port for persisting and retrieving checkpoint data.
Namespace: Serenity.Checkpoint.Infrastructure.Interfaces.Stores
Assembly: Serenity.Checkpoint.Application.dll
Syntax
public interface ICheckpointStore
Remarks
Implementations decide the serialization format and storage medium (file system, PlayerPrefs, cloud, etc.). The business layer treats checkpoint data as opaque payloads and delegates all persistence to this abstraction.
Methods
Delete(CheckpointSlot)
Deletes the checkpoint in the given slot, if any.
Declaration
void Delete(CheckpointSlot slot)
Parameters
| Type | Name | Description |
|---|---|---|
| CheckpointSlot | slot | The slot to delete. |
Exists(CheckpointSlot)
Checks whether a checkpoint exists in the given slot.
Declaration
bool Exists(CheckpointSlot slot)
Parameters
| Type | Name | Description |
|---|---|---|
| CheckpointSlot | slot | The slot to check. |
Returns
| Type | Description |
|---|---|
| bool |
|
QueryAll()
Returns metadata for all available checkpoints.
Declaration
CheckpointMetadata[] QueryAll()
Returns
| Type | Description |
|---|---|
| CheckpointMetadata[] | An array of metadata entries. May be empty. |
Save(CheckpointSlot, CheckpointSnapshot)
Persists a checkpoint snapshot to the given slot.
Declaration
void Save(CheckpointSlot slot, CheckpointSnapshot snapshot)
Parameters
| Type | Name | Description |
|---|---|---|
| CheckpointSlot | slot | The target slot. |
| CheckpointSnapshot | snapshot | The checkpoint snapshot to persist. |
TryLoad(CheckpointSlot, out CheckpointSnapshot)
Attempts to load a checkpoint from the given slot.
Declaration
bool TryLoad(CheckpointSlot slot, out CheckpointSnapshot snapshot)
Parameters
| Type | Name | Description |
|---|---|---|
| CheckpointSlot | slot | The slot to load from. |
| CheckpointSnapshot | snapshot | The loaded snapshot, or default if not found. |
Returns
| Type | Description |
|---|---|
| bool |
|