Пример #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"));
 }
Пример #2
0
 public void Stop()
 {
     Bot.AlertAdmin("The notification service has been suspended at: " + DateTime.Now.ToString("G"));
     _timer.Stop();
 }
Пример #3
0
 private static async void OnLongRunningTimedEvent(Object source, ElapsedEventArgs e)
 {
     Bot.AlertAdmin("Service is still active.");
 }