Table of Contents

Class SnapshotStore

Namespace
InSite.Persistence
Assembly
InSite.Persistence.dll
public class SnapshotStore : ISnapshotStore
Inheritance
SnapshotStore
Implements
Inherited Members

Constructors

SnapshotStore(string, string)

public SnapshotStore(string databaseConnectionString, string offlineStorageFolder)

Parameters

databaseConnectionString string
offlineStorageFolder string

Methods

Box(Guid)

Copies a snapshot to offline storage and removes it from online logs.

public void Box(Guid aggregate)

Parameters

aggregate Guid

Count(Guid)

Counts the number of snapshots in the store for an aggregate.

public int Count(Guid id)

Parameters

id Guid

Returns

int

Delete(Guid, string)

Deletes a snapshot from the store.

public void Delete(Guid aggregate, string type)

Parameters

aggregate Guid
type string

Get(Guid)

Gets a snapshot from the store.

public Snapshot Get(Guid id)

Parameters

id Guid

Returns

Snapshot

Save(Snapshot)

Saves a snapshot to the store.

public void Save(Snapshot snapshot)

Parameters

snapshot Snapshot

Unbox(Guid)

Retrieves an aggregate from offline storage and returns only its most recent state.

public Snapshot Unbox(Guid aggregate)

Parameters

aggregate Guid

Returns

Snapshot