Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
NullLedgerProvider.cs
1using System;
2using System.Threading.Tasks;
5
6namespace Waher.Persistence
7{
12 {
17 {
18 }
19
24 public Task NewEntry(object Object) => Task.CompletedTask;
25
30 public Task UpdatedEntry(object Object) => Task.CompletedTask;
31
36 public Task DeletedEntry(object Object) => Task.CompletedTask;
37
42 public Task ClearedCollection(string Collection) => Task.CompletedTask;
43
49 public Task<ILedgerEnumerator<T>> GetEnumerator<T>() => throw new InvalidOperationException("Server is shutting down.");
50
56 public Task<ILedgerEnumerator<object>> GetEnumerator(string CollectionName) => throw new InvalidOperationException("Server is shutting down.");
57
61 public Task Start() => Task.CompletedTask;
62
66 public Task Stop() => Task.CompletedTask;
67
71 public Task Flush() => Task.CompletedTask;
72
77 public Task<string[]> GetCollections() => Task.FromResult<string[]>(new string[0]);
78
86 public Task<bool> Export(ILedgerExport Output, LedgerExportRestriction Restriction) => Task.FromResult(true);
87
96 public Task<bool> Export(ILedgerExport Output, LedgerExportRestriction Restriction, ProfilerThread Thread) => Task.FromResult(true);
97
103 public void Register(ILedgerExternalEvents ExternalEvents) { }
104
110 public void Unregister(ILedgerExternalEvents ExternalEvents) { }
111
112 }
113}
Contains basic ledger export restrictions.
Task< bool > Export(ILedgerExport Output, LedgerExportRestriction Restriction)
Performs an export of the entire ledger.
Task Flush()
Persists any pending changes.
Task< string[]> GetCollections()
Gets an array of available collections.
Task Start()
Called when processing starts.
Task Stop()
Called when processing ends.
Task ClearedCollection(string Collection)
Clears a collection in the ledger.
Task< bool > Export(ILedgerExport Output, LedgerExportRestriction Restriction, ProfilerThread Thread)
Performs an export of the entire ledger.
Task< ILedgerEnumerator< T > > GetEnumerator< T >()
Gets an eumerator for objects of type T .
Task UpdatedEntry(object Object)
Updates an entry in the ledger.
Task DeletedEntry(object Object)
Deletes an entry in the ledger.
void Unregister(ILedgerExternalEvents ExternalEvents)
Unregisters a recipient of external events.
void Register(ILedgerExternalEvents ExternalEvents)
Registers a recipient of external events.
Task NewEntry(object Object)
Adds an entry to the ledger.
Task< ILedgerEnumerator< object > > GetEnumerator(string CollectionName)
Gets an eumerator for objects in a collection.
Class that keeps track of events and timing for one thread.
Interface for proxy for reporting changes to the ledger from external sources.
Interface for ledger providers that can be plugged into the static Ledger class.