Exemplo n.º 1
0
        public async Task StopAsync(CancellationToken cancellationToken)
        {
            _logger.LogInformation("Stopping metric service");
            await _server.StopAsync();

            _server.Dispose();
        }
Exemplo n.º 2
0
        public async Task StopAsync(CancellationToken cancellationToken)
        {
            using (_metricServer)
            {
                Console.WriteLine("Shutting down metric server");
                await _metricServer.StopAsync();

                Console.WriteLine("Done shutting down metric server");
            }
        }
Exemplo n.º 3
0
        public async Task StopAsync(CancellationToken cancellationToken)
        {
            using (_metricServer)
            {
                _logger.LogDebug("Shutting down metric server");
                await _metricServer.StopAsync();

                _logger.LogDebug("Done shutting down metric server");
            }
        }
Exemplo n.º 4
0
        public async Task StopAsync(CancellationToken cancellationToken)
        {
            _logger.Debug("Stopping metrics server");

            try
            {
                await _server.StopAsync();
            }
            catch (Exception ex)
            {
                _logger.Error("Error stopping metrics server", ex);
            }
        }