Exemple #1
0
        public async Task StopAsync(CancellationToken cancellationToken)
        {
            logger.LogDebug("Stopping service... ");
            try
            {
                source.Cancel();
                source.Dispose();
                await adapter.Stop(cancellationToken);
            }
            catch (Exception e)
            {
                logger.LogError(e, "Failed to stop service!");
                throw;
            }

            logger.LogInformation("Service stopped.");
        }
Exemple #2
0
 public async Task Stop()
 {
     await adapter.Stop();
 }