예제 #1
0
 public Task StopAsync(CancellationToken cancellationToken)
 {
     if (_logger.IsEnabled(LogLevel.Information))
     {
         _logger?.LogInformation("服务开始断开...");
     }
     return(_server.StopAsync(cancellationToken));
 }
예제 #2
0
        public Task StopAsync(CancellationToken cancellationToken)
        {
            if (_logger.IsEnabled(LogLevel.Information))
            {
                _logger?.LogInformation("服务开始断开...");
            }
            _server.StopAsync(cancellationToken);
            var serviceRouteManager = _provider.GetService <IServiceRouteManager>();

            return(serviceRouteManager.DeregisterAsync());
        }