public Task StopAsync(CancellationToken cancellationToken) { UserActivityFileMonitor?.Dispose(); ProcessScannerTimer?.Stop(); GamesDataUpdateTimer?.Stop(); return(WebHost.StopAsync()); }
public void Stop() { if (WebHost != null) { WebHost.StopAsync(TimeSpan.FromSeconds(0)); WebHost.Dispose(); WebHost = null; } }
public async Task Stop() { if (WebHost != null) { await WebHost.StopAsync(); WebHost = null; _uri = null; } }
protected virtual void Dispose(bool disposing) { if (_disposedValue) { return; } if (disposing) { WebHost.StopAsync().GetAwaiter().GetResult(); WebHost.Dispose(); } _disposedValue = true; }
public async Task Stop() { if (WebHost != null) { try { await WebHost.StopAsync(); } catch (TaskCanceledException) { // Ignore time out error } WebHost = null; _uri = null; } }
public async Task OnStoppingServiceAsync(OperationContext context) { if (ProxyService != null) { await ProxyService.ShutdownAsync(context).IgnoreFailure(); } if (ContentCacheService != null) { await ContentCacheService.ShutdownAsync(context).IgnoreFailure(); } // Not passing cancellation token since it will already be signaled await WebHost.StopAsync(); WebHost.Dispose(); }
public async Task OnStoppingServiceAsync(OperationContext context) { // Not passing cancellation token since it will already be signaled // WebHost is null for out-of-proc casaas case. if (WebHost != null) { await WebHost.StopAsync(); } if (ProxyService != null) { await ProxyService.ShutdownAsync(context).IgnoreFailure(); } if (ContentCacheService != null) { await ContentCacheService.ShutdownAsync(context).IgnoreFailure(); } WebHost?.Dispose(); }
public override async Task OnStop() { await base.OnStop(); await WebHost.StopAsync(); }