Example #1
0
            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();
            }
Example #2
0
            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();
            }