예제 #1
0
 public override Task StopAsync(CancellationToken cancellationToken)
 {
     Log.Information("Service stop triggered");
     try
     {
         BotRunner.StopRunning();
         return(base.StartAsync(cancellationToken));
     }
     catch (Exception ex)
     {
         Log.Error(ex, "Exception occured when stopping the bot.");
         throw;
     }
 }