Interface ISaveState
Defines a contract for saving and loading the state of an object. The state must be JSON serializable.
Methods
DefaultSaveStateAsync()
Returns
LoadStateAsync(JsonElement)
Loads a previously saved state into the object.
Parameters
state
JsonElement A dictionary representing the saved state. The structure of the state is implementation-defined but must be JSON serializable.
Returns
- Value
Task A task representing the asynchronous operation.
SaveStateAsync()
Saves the current state of the object.
Returns
- Value
Task <JsonElement > A task representing the asynchronous operation, returning a dictionary containing the saved state. The structure of the state is implementation-defined but must be JSON serializable.