Table of Contents

Interface IPersistenceUnitOfWork

Namespace
Moongate.Persistence.Interfaces.Persistence
Assembly
Moongate.Persistence.dll

Coordinates repositories and persistence lifecycle for world state.

public interface IPersistenceUnitOfWork

Properties

Accounts

Gets the account repository.

IAccountRepository Accounts { get; }

Property Value

IAccountRepository

Items

Gets the item repository.

IItemRepository Items { get; }

Property Value

IItemRepository

Mobiles

Gets the mobile repository.

IMobileRepository Mobiles { get; }

Property Value

IMobileRepository

Methods

AllocateNextAccountId()

Allocates the next progressive account serial identifier.

Serial AllocateNextAccountId()

Returns

Serial

AllocateNextItemId()

Allocates the next progressive item serial identifier.

Serial AllocateNextItemId()

Returns

Serial

AllocateNextMobileId()

Allocates the next progressive mobile serial identifier.

Serial AllocateNextMobileId()

Returns

Serial

InitializeAsync(CancellationToken)

Loads state from snapshot and replays journal entries.

ValueTask InitializeAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

ValueTask

SaveSnapshotAsync(CancellationToken)

Writes a new snapshot and resets the journal.

ValueTask SaveSnapshotAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

ValueTask