Skip to content

Easy Storage handling with callbacks #8

Description

@EnochMiningCorporation

This is a TODO (I'm happy to do this work):

Provide a means for EasyAPI users to easily save/restore state to/from Storage, using callbacks such as:

public virtual Dictionary<string, string> onSaveState(Dictionary<string, string> outState);
public virtual void onRestoreState(Dictionary<string, string> state);

And using a format to serialise/deserialise data.*

The idea with passing outState into the onSaveState callback is so EasyAPI itself/modules can include any state saving they may need to do internally, and EasyAPI users can simply add to that.

*I've noticed you can't put newlines into the Storage string, so can't use newline as a key-value pair delimiter like with DetailedInfo. Need to select an appropriate (least potentially conflicting) delimiter for Storage.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions