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
pathstringNonempty run file path.
arenaIdsFunc<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
Path
public string Path { get; }
Property Value
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
Save(RunSnapshot)
Stores the supplied run snapshot separately from profile and user options.
public void Save(RunSnapshot run)
Parameters
runRunSnapshot