/// <inheritdoc /> protected override async Task <BoolResult> ShutdownCoreAsync(OperationContext context) { var results = new List <Tuple <string, BoolResult> >(); var innerResult = await InnerContentStore.ShutdownAsync(context); results.Add(Tuple.Create(nameof(InnerContentStore), innerResult)); _evictionNagleQueue?.Dispose(); _touchNagleQueue?.Dispose(); var locationStoreResult = await _contentLocationStore.ShutdownAsync(context); results.Add(Tuple.Create(nameof(_contentLocationStore), locationStoreResult)); var factoryResult = await _contentLocationStoreFactory.ShutdownAsync(context); results.Add(Tuple.Create(nameof(_contentLocationStoreFactory), factoryResult)); if (_distributedCopier != null) { var copierResult = await _distributedCopier.ShutdownAsync(context); results.Add(Tuple.Create(nameof(_distributedCopier), copierResult)); } return(ShutdownErrorCompiler(results)); }
/// <inheritdoc /> protected override async Task <BoolResult> ShutdownCoreAsync(OperationContext context) { var results = new List <Tuple <string, BoolResult> >(); if (_proactiveCopySession?.IsValueCreated == true) { var sessionResult = await _proactiveCopySession.Value; if (sessionResult.Succeeded) { var proactiveCopySessionShutdownResult = await sessionResult.Value.ShutdownAsync(context); results.Add(Tuple.Create(nameof(_proactiveCopySession), proactiveCopySessionShutdownResult)); } } var innerResult = await InnerContentStore.ShutdownAsync(context); results.Add(Tuple.Create(nameof(InnerContentStore), innerResult)); _evictionNagleQueue?.Dispose(); _touchNagleQueue?.Dispose(); if (_contentLocationStore != null) { var locationStoreResult = await _contentLocationStore.ShutdownAsync(context); results.Add(Tuple.Create(nameof(_contentLocationStore), locationStoreResult)); } var factoryResult = await _contentLocationStoreFactory.ShutdownAsync(context); results.Add(Tuple.Create(nameof(_contentLocationStoreFactory), factoryResult)); if (_distributedCopier != null) { var copierResult = await _distributedCopier.ShutdownAsync(context); results.Add(Tuple.Create(nameof(_distributedCopier), copierResult)); } return(ShutdownErrorCompiler(results)); }