Interface ISavedData
The definition of an object that saves and loads the persistent state of an IEntity.
This is an optional component of the IEntity structure if the IEntityData implementation also extends ISavedDataProvider.
Namespace: IdleKit.Framework
Assembly: cs.temp.dll.dll
Syntax
public interface ISavedData : IInjectable
Properties
timeCreated
Returns the timestamp in milliseconds that the ISavedData was first created.
Declaration
long timeCreated { get; }
Property Value
Type | Description |
---|---|
Int64 |
timeModified
Returns the timestamp in milliseconds that the ISavedData was last serialized.
Declaration
long timeModified { get; }
Property Value
Type | Description |
---|---|
Int64 |
Methods
Delete()
Deletes the saved state for this data
Declaration
void Delete()
Load()
Either loads a saved state of a data or creates a fresh state if could not be deserialized
Declaration
void Load()
Reset()
Resets to the default state of the saved data by setting all fields and calling Save(). The end results of this call is an equally or more optimal alternative to calling a Delete() directly followed by a Load() on the same data to revert it to default values
Declaration
void Reset()
Save()
Saves state for a data. It marks the ISavedData dirty so SerializationService can serialize all the dirty ISerializer at the same time using SerializeDirty().
To forcefully serialize a single save state, use Serialize<TSaveData>(String, TSaveData)
Declaration
void Save()