示例#1
0
        public void StartRestoringArchive(string eTag)
        {
            var version = new DashboardVersion
            {
                Version      = CurrentDashboardVersion,
                UpgradeState = DashboardUpgradeState.RestoringArchive
            };

            TryCreateOrUpdateVersion(version, eTag);
        }
示例#2
0
        public void StartDeletingOldData(string eTag)
        {
            var version = new DashboardVersion
            {
                Version      = CurrentDashboardVersion,
                UpgradeState = DashboardUpgradeState.DeletingOldData
            };

            TryCreateOrUpdateVersion(version, eTag);
        }
        public void StartRestoringArchive(string eTag)
        {
            var version = new DashboardVersion
            {
                Version = CurrentDashboardVersion,
                UpgradeState = DashboardUpgradeState.RestoringArchive
            };

            TryCreateOrUpdateVersion(version, eTag);
        }
        public void StartDeletingOldData(string eTag)
        {
            var version = new DashboardVersion
            {
                Version = CurrentDashboardVersion,
                UpgradeState = DashboardUpgradeState.DeletingOldData
            };

            TryCreateOrUpdateVersion(version, eTag);
        }
示例#5
0
 private void TryCreateOrUpdateVersion(DashboardVersion version, string eTag)
 {
     if (!String.IsNullOrEmpty(eTag))
     {
         _store.TryUpdate(DashboardBlobNames.Version, eTag, version);
     }
     else
     {
         _store.TryCreate(DashboardBlobNames.Version, version);
     }
 }
示例#6
0
        public void FinishUpgrade(string eTag)
        {
            // Set the new version and the upgrade state
            var version = new DashboardVersion
            {
                Version      = CurrentDashboardVersion,
                UpgradeState = DashboardUpgradeState.Finished
            };

            TryCreateOrUpdateVersion(version, eTag);
        }
        public void FinishUpgrade(string eTag)
        {
            // Set the new version and the upgrade state
            var version = new DashboardVersion
            {
                Version = CurrentDashboardVersion,
                UpgradeState = DashboardUpgradeState.Finished
            };

            TryCreateOrUpdateVersion(version, eTag);
        }
 private void TryCreateOrUpdateVersion(DashboardVersion version, string eTag)
 {
     if (!String.IsNullOrEmpty(eTag))
     {
         _store.TryUpdate(DashboardBlobNames.Version, eTag, version);
     }
     else
     {
         _store.TryCreate(DashboardBlobNames.Version, version);
     }
 }