示例#1
0
文件: Probe.cs 项目: nvsnkv/NVs.Probe
        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.");
        }
示例#2
0
 public async Task Stop()
 {
     await adapter.Stop();
 }