private IConcurrentDocument <DashboardVersion> StartDeletingOldData(IConcurrentMetadataTextStore store, IConcurrentDocument <DashboardVersion> version)
        {
            // Set status to deletion status (using etag)
            _dashboardVersionManager.StartDeletingOldData(version.ETag);

            // Refresh version
            version = _dashboardVersionManager.Read();

            while (version.Document.UpgradeState == DashboardUpgradeState.DeletingOldData)
            {
                var items = store.List(null);

                // Refresh version
                version = _dashboardVersionManager.Read();

                // Return once everything's deleted
                if (items.Count() == 0 || version.Document.UpgradeState != DashboardUpgradeState.DeletingOldData)
                {
                    return(version);
                }

                // Delete blobs
                foreach (var blob in items)
                {
                    DeleteIfLatest(store, blob);
                }
            }

            return(version);
        }
        private IConcurrentDocument<DashboardVersion> StartDeletingOldData(IConcurrentMetadataTextStore store, IConcurrentDocument<DashboardVersion> version)
        {
            // Set status to deletion status (using etag)
            _dashboardVersionManager.StartDeletingOldData(version.ETag);

            // Refresh version
            version = _dashboardVersionManager.Read();

            while (version.Document.UpgradeState == DashboardUpgradeState.DeletingOldData)
            {
                var items = store.List(null);

                // Refresh version
                version = _dashboardVersionManager.Read();

                // Return once everything's deleted
                if (items.Count() == 0 || version.Document.UpgradeState != DashboardUpgradeState.DeletingOldData)
                {
                    return version;
                }

                // Delete blobs
                foreach (var blob in items)
                {
                    DeleteIfLatest(store, blob);
                }
            }

            return version;
        }
 public IEnumerable <ConcurrentMetadata> List(string prefix)
 {
     return(_innerStore.List(prefix));
 }