Table of Contents

Interface ISaveLoader

Namespace
Aarthificial.Safekeeper.Loaders
Assembly
Aarthificial.Safekeeper.dll

A common interface for saving and loading data in the persistent storage.

public interface ISaveLoader

Methods

Create()

Create the save data for this save.

Task<ISaveData> Create()

Returns

Task<ISaveData>

The newly created save data.

Remarks

This method is used if the save does not exist yet. It should not save the data to the persistent storage, only create it. This data will later be passed to Save(ISaveData).

Delete()

Remove this save from the persistent storage.

Task Delete()

Returns

Task

Exists()

Check if the save has already been created.

Task<bool> Exists()

Returns

Task<bool>

Whether the save exists.

GetName()

Get the name of this save.

Task<string> GetName()

Returns

Task<string>

The name of this save.

Remarks

Used exclusively for debugging purposes.

Load()

Load the data from the persistent storage.

Task<ISaveData> Load()

Returns

Task<ISaveData>

The loaded data.

Save(ISaveData)

Save the data to the persistent storage.

Task Save(ISaveData data)

Parameters

data ISaveData

The data to save.

Returns

Task