Пример #1
0
        public async Task StopAsync(CancellationToken cancellationToken)
        {
            _logger.LogInformation("Stopping metric service");
            await _server.StopAsync();

            _server.Dispose();
        }
Пример #2
0
        protected virtual void Dispose(bool disposing)
        {
            if (!_disposedValue)
            {
                if (disposing)
                {
                    _collector?.Dispose();
                    _server.Stop();
                    _server.Dispose();
                }

                _disposedValue = true;
            }
        }
Пример #3
0
 public void Dispose()
 {
     _server?.Dispose();
 }