Skip to main content

SavingSystem.VersionSetup

A class in Root.Township, Alta.Saving.

One save data version of a saved type: the data class and its lazily built serializer and activator. Kept per version number by SavingSystem.SavingSetup.

Constructors​

MemberWhat it is
VersionSetup(Type type)Creates a SavingSystem.VersionSetup from type.

Fields​

3 private and internal fields
MemberWhat it is
private TypeSerializationHelper.ObjectActivator activatorCached constructor delegate, built on first CreateInstance.
private Type dataTypeBacking field for Type.
private Action<SaveData, Stream, ChunkVersioning> serializerCached serializer delegate, built on first Serialize.

Properties​

MemberWhat it is
Type Type { get; }The save data class for this version.

Methods​

MemberWhat it is
object CreateInstance()Creates a new instance of the data type through a cached activator.
void Serialize(SaveData topic, Stream stream, ChunkVersioning versioning)Reads or writes a save topic with this version's generated serializer, building it on first use.

Used in​

Members of other types that take, return or hold a VersionSetup: