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