IAsyncPersistable
Ecng.Serialization
Interface for objects whose state can be persisted asynchronously using a SettingsStorage.
Methoden
LoadAsync
public Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = iAsyncPersistable.LoadAsync(storage, cancellationToken)
Asynchronously loads the state of the object from the specified SettingsStorage.
- storage
- The SettingsStorage instance from which to load the data.
- cancellationToken
- A token to monitor for cancellation requests.
Rückgabe: A task that represents the asynchronous load operation.
SaveAsync
public Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = iAsyncPersistable.SaveAsync(storage, cancellationToken)
Asynchronously saves the state of the object to the specified SettingsStorage.
- storage
- The SettingsStorage instance to which to save the data.
- cancellationToken
- A token to monitor for cancellation requests.
Rückgabe: A task that represents the asynchronous save operation.