Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
IStorageService.cs
4
6{
10 [DefaultImplementation(typeof(StorageService))]
11 public interface IStorageService
12 {
16 string DataFolder { get; }
17
18 #region LifeCycle management
19
24 Task Init(CancellationToken? cancellationToken);
25
30 Task<bool> WaitInitDone();
31
35 Task Shutdown();
36
37 #endregion
38
43 Task Insert(object obj);
44
49 Task Update(object obj);
50
55 Task<T> FindFirstDeleteRest<T>() where T : class;
56
61 Task<T> FindFirstIgnoreRest<T>() where T : class;
62
67 Task Export(IDatabaseExport exportOutput);
68
73 }
74}
Wraps the Database for easy access to persistent encrypted storage. Use this for any sensitive data.
Task Init(CancellationToken? cancellationToken)
Initializes the persistent storage on a background task. This call is asynchronous.
Task< T > FindFirstDeleteRest< T >()
Returns the first match (if any) of the given type. Deletes the other matching entries.
void FlagForRepair()
Flags the database for repair, so that the next time the app is opened, the database will be repaired...
Task< bool > WaitInitDone()
Waits for initialization of the storage service to be completed.
Task Shutdown()
Shuts down this persistent storage instance.
Task Insert(object obj)
Inserts an object into the database.
Task Update(object obj)
Updates an object in the database.