Ejemplo n.º 1
0
 public void Start()
 {
     Bot.RegisterLifecycle();
     Console.WriteLine("Service has started.");
     SetTimer();
     //
     SetLongRunningTimer();
     //
     Bot.RegisterLifecycle();
     //
     Bot.AlertAdmin("The notification service has spun up at: " + DateTime.Now.ToString("G"));
 }
Ejemplo n.º 2
0
 public void Stop()
 {
     Bot.AlertAdmin("The notification service has been suspended at: " + DateTime.Now.ToString("G"));
     _timer.Stop();
 }
Ejemplo n.º 3
0
 private static async void OnLongRunningTimedEvent(Object source, ElapsedEventArgs e)
 {
     Bot.AlertAdmin("Service is still active.");
 }