Table of Contents

Interface ISavedStateRecordPair<T>

Namespace
SkyrimForge
Assembly
SkyrimForge.dll

One record in a saved-state store, read and written as T under one key.

public interface ISavedStateRecordPair<T> where T : class

Type Parameters

T

Remarks

The record is stored as System.Text.Json writes it. Each FormId<TForm> in it, at any depth, is mapped through the load order a save recorded, as SetString(string, string?) describes. A form whose .esm, .esp, or .esl file is no longer loaded is stored as a JSON null, which a FormId<TForm> property reads as the ID 0 and a nullable one reads as null. Enums are stored as their integers. A property that neither a setter nor a constructor parameter receives is written and not read.

Properties

Key

The key this reads and writes within its store.

string Key { get; }

Property Value

string

Value

The stored record. It is null where nothing is stored under Key. Assigning null drops the key. Each read deserializes the stored JSON into a new object, so a change to that object is stored only by assigning the object.

T? Value { get; set; }

Property Value

T

Exceptions

JsonException

The stored JSON does not deserialize as T.