Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ISettingsService.cs
2
4{
8 [DefaultImplementation(typeof(SettingsService))]
9 public interface ISettingsService
10 {
16 Task SaveState(string Key, string State);
17
23 Task SaveState(string Key, long State);
24
30 Task SaveState(string Key, double State);
31
37 Task SaveState(string Key, bool State);
38
44 Task SaveState(string Key, DateTime State);
45
51 Task SaveState(string Key, TimeSpan State);
52
58 Task SaveState(string Key, Enum State);
59
65 Task SaveState(string Key, object State);
66
73 Task<string?> RestoreStringState(string Key, string? DefaultValueIfNotFound = default);
74
81 Task<long> RestoreLongState(string Key, long DefaultValueIfNotFound = default);
82
89 Task<double> RestoreDoubleState(string Key, double DefaultValueIfNotFound = default);
90
97 Task<bool> RestoreBoolState(string Key, bool DefaultValueIfNotFound = default);
98
105 Task<DateTime> RestoreDateTimeState(string Key, DateTime DefaultValueIfNotFound = default);
106
113 Task<TimeSpan> RestoreTimeSpanState(string Key, TimeSpan DefaultValueIfNotFound = default);
114
121 Task<Enum?> RestoreEnumState(string Key, Enum? DefaultValueIfNotFound = default);
122
130 Task<T?> RestoreState<T>(string Key, T? DefaultValueIfNotFound = default);
131
136 Task RemoveState(string Key);
137
142 Task<bool> WaitInitDone();
143 }
144}
Handles common runtime settings that need to be persisted during sessions.
Task< long > RestoreLongState(string Key, long DefaultValueIfNotFound=default)
Restores State for the specified key.
Task SaveState(string Key, double State)
Saves State with the given key.
Task< string?> RestoreStringState(string Key, string? DefaultValueIfNotFound=default)
Restores State for the specified key.
Task SaveState(string Key, bool State)
Saves State with the given key.
Task SaveState(string Key, string State)
Saves State with the given key.
Task SaveState(string Key, TimeSpan State)
Saves State with the given key.
Task< DateTime > RestoreDateTimeState(string Key, DateTime DefaultValueIfNotFound=default)
Restores State for the specified key.
Task< TimeSpan > RestoreTimeSpanState(string Key, TimeSpan DefaultValueIfNotFound=default)
Restores State for the specified key.
Task< bool > WaitInitDone()
Waits for initialization of the storage service to be completed.
Task RemoveState(string Key)
Removes a given State.
Task< Enum?> RestoreEnumState(string Key, Enum? DefaultValueIfNotFound=default)
Restores State for the specified key.
Task SaveState(string Key, Enum State)
Saves State with the given key.
Task SaveState(string Key, long State)
Saves State with the given key.
Task< T?> RestoreState< T >(string Key, T? DefaultValueIfNotFound=default)
Restores State for the specified key.
Task< double > RestoreDoubleState(string Key, double DefaultValueIfNotFound=default)
Restores State for the specified key.
Task SaveState(string Key, DateTime State)
Saves State with the given key.
Task SaveState(string Key, object State)
Saves State with the given key.
Task< bool > RestoreBoolState(string Key, bool DefaultValueIfNotFound=default)
Restores State for the specified key.