Class JsonFileRunStore

Namespace
SurvivorsMaker.Presentation
Assembly
SurvivorsMaker.Presentation.dll

The run in progress (single slot) as a SaveEnvelope JSON file. Saving null empties the slot.

public sealed class JsonFileRunStore : IRunStore
Inheritance
JsonFileRunStore
Implements
Inherited Members

Constructors

JsonFileRunStore(string, Func<IReadOnlyList<string>>)

Creates storage for one run snapshot independently of profile progress and user options.

public JsonFileRunStore(string path, Func<IReadOnlyList<string>> arenaIds = null)

Parameters

path string

Nonempty run file path.

arenaIds Func<IReadOnlyList<string>>

Stable arena ids in content order; needed only to read runs saved before arena ids existed.

Properties

File

public JsonEnvelopeFile File { get; }

Property Value

JsonEnvelopeFile

Path

public string Path { get; }

Property Value

string

Methods

Delete()

Deletes the saved run regardless of its state (an explicit reset).

public void Delete()

Load()

Loads the saved-run snapshot, or no snapshot when none is stored.

public RunSnapshot Load()

Returns

RunSnapshot

Save(RunSnapshot)

Stores the supplied run snapshot separately from profile and user options.

public void Save(RunSnapshot run)

Parameters

run RunSnapshot