ToSic.SexyContent.Installer.InstallationController.FinishAbortedUpgrade C# (CSharp) Method

FinishAbortedUpgrade() private method

private FinishAbortedUpgrade ( ) : void
return void
        internal void FinishAbortedUpgrade()
        {
            _logger.LogStep("", "FinishAbortedUpgrade starting", false);
            _logger.LogStep("", "Will handle " + Settings.Installation.UpgradeVersionList.Length + " versions");
            // Run upgrade again for all versions that do not have a corresponding logfile
            foreach (var upgradeVersion in Settings.Installation.UpgradeVersionList)
            {
                var complete = IsUpgradeComplete(upgradeVersion, "- check for FinishAbortedUpgrade");
                _logger.LogStep("", "Status for version " + upgradeVersion + " is " + complete);
                if (!complete)
                    UpgradeModule(upgradeVersion);
            }

            _logger.LogStep("", "FinishAbortedUpgrade done", false);

            //_logger.SaveDetailedLog();
            // Restart application
            HttpRuntime.UnloadAppDomain();
        }

Usage Example

Exemplo n.º 1
0
        // had to disable this, as most requests now come from a lone page [ValidateAntiForgeryToken]
        public bool FinishInstallation()
        {
            var ic = new InstallationController();
            if (ic.IsUpgradeRunning)
                throw new Exception("There seems to be an upgrade running - please wait. If you still see this message after 10 minutes, please restart the web application.");

            ic.FinishAbortedUpgrade();

            return true;
        }