Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
CounterModule.cs
1using System.Threading.Tasks;
3
5{
9 [Singleton]
10 public class CounterModule : IModule
11 {
12 private static bool running = false;
13
17 public static bool Running => running;
18
22 public Task Start()
23 {
24 running = true;
25 return Task.CompletedTask;
26 }
27
31 public async Task Stop()
32 {
33 running = false;
34
36 }
37
38 }
39}
Module controling the life-cycle of counters.
Task Start()
Starts the module.
static bool Running
If the module is running or not.
async Task Stop()
Stops the module.
Static class managing persistent counters.
static async Task FlushAsync()
Flushes all cached counters to the database.
Interface for late-bound modules loaded at runtime.
Definition: IModule.cs:9