Namespace Scylla.Core.Persistence
Classes
ScyllaPersistenceRegistry
Static registry that every IScyllaPersistable implementor registers with directly, so the Scylla Persistence module can discover save partitions contributed by modules that must not reference it. See IScyllaPersistable for why this registry exists instead of the simpler property-injection pattern used elsewhere in Core.
Structs
ScyllaPartitionID
Reserves the framework's own save partition ID strings, mirroring how ScyllaModuleID reserves module ID strings. Use these constants instead of a verbatim string literal when declaring a framework-owned PartitionID, so a typo cannot silently create two partitions where one was intended.
Interfaces
IScyllaPersistable
Contract between a system that owns in-memory game state and the Scylla Persistence module that writes and restores it. A system implements this interface and registers itself with ScyllaPersistenceRegistry to contribute one partition to every save, without referencing the Persistence module at compile time.
IScyllaPersistable<TState>
Type-safe sibling of IScyllaPersistable. Implement this instead of the non-generic interface when the captured state has a single concrete type known at compile time, which is the common case. The non-generic CaptureState() and RestoreState(object, int) members are bridged automatically through default interface implementations, so an implementer only writes the typed pair below.