public override void Execute() { var argsStruct = new ReinstallArgs() { }; var argsDict = Tools.ParseKeyValList(args); string modeStr; if (Tools.TryGetValueIgnoreKeyCase(argsDict, "downloadMode", out modeStr)) { if (!Tools.GetEnumValueByNameIgnoreCase <EDownloadMode>(modeStr, out argsStruct.DownloadMode)) { throw new ArgumentException(String.Format("invalid download mode '{0}'", modeStr), "downloadMode"); } } string urlStr; if (Tools.TryGetValueIgnoreKeyCase(argsDict, "url", out urlStr)) { argsStruct.Url = urlStr; } ctrl.Reinstall(_requestorId, argsStruct); WriteResponse("ACK"); }
protected override void Process(ReinstallArgs args) { Assert.ArgumentNotNull(args, "args"); string folderDirectory = args.WebRootPath + @"\App_Config\Include\"; SetDataFolderPatchHelper.Process(folderDirectory, args.DataFolderPath); }
public static void ReinstallInstance([NotNull] Instance instance, Window owner, [NotNull] string license, [NotNull] SqlConnectionStringBuilder connectionString) { Assert.ArgumentNotNull(instance, nameof(instance)); Assert.ArgumentNotNull(license, nameof(license)); Assert.ArgumentNotNull(connectionString, nameof(connectionString)); if (instance.IsSitecore) { Product product = instance.Product; if (string.IsNullOrEmpty(product.PackagePath)) { if (WindowHelper.ShowMessage("The {0} product isn't presented in your local repository. Would you like to choose the zip installation package?".FormatWith(instance.ProductFullName), MessageBoxButton.YesNo, MessageBoxImage.Stop) == MessageBoxResult.Yes) { var patt = instance.ProductFullName + ".zip"; OpenFileDialog fileBrowserDialog = new OpenFileDialog { Title = @"Choose installation package", Multiselect = false, CheckFileExists = true, Filter = patt + '|' + patt }; if (fileBrowserDialog.ShowDialog() == DialogResult.OK) { product = Product.Parse(fileBrowserDialog.FileName); if (string.IsNullOrEmpty(product.PackagePath)) { WindowHelper.HandleError("SIM can't parse the {0} package".FormatWith(instance.ProductFullName), true, null); return; } } } } if (string.IsNullOrEmpty(product.PackagePath)) { return; } ReinstallArgs args; try { args = new ReinstallArgs(instance, connectionString, license, SIM.Pipelines.Install.Settings.CoreInstallWebServerIdentity.Value, Settings.CoreInstallNotFoundTransfer.Value); } catch (Exception ex) { WindowHelper.HandleError(ex.Message, false, ex); return; } var name = instance.Name; WizardPipelineManager.Start("reinstall", owner, args, null, ignore => MainWindowHelper.MakeInstanceSelected(name)); } }
private void reinstallManuallyToolStripMenuItem_Click(object sender, EventArgs e) { if (MessageBox.Show("Reinstall Dirigent on all computers?\n\nThis will kills all apps and temporarily terminates the dirigent on all computers!", "Dirigent", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK) { var args = new ReinstallArgs() { DownloadMode = EDownloadMode.Manual }; _ctrl.Send(new Net.ReinstallMessage(_ctrl.Name, args)); } }
/// <inheritdoc/> public override int GetHashCode() { unchecked { int result = (Reinstall ?? "").GetHashCode(); result = (result * 397) ^ ReinstallArgs?.GetHashCode() ?? 0; result = (result * 397) ^ ShowIcons?.GetHashCode() ?? 0; result = (result * 397) ^ ShowIconsArgs?.GetHashCode() ?? 0; result = (result * 397) ^ HideIcons?.GetHashCode() ?? 0; result = (result * 397) ^ HideIconsArgs?.GetHashCode() ?? 0; return(result); } }
protected override void Process(ReinstallArgs args) { FileSystem.FileSystem.Local.Directory.DeleteIfExists(args.TempFolder); }
public ReinstallMessage(string requestorId, ReinstallArgs args) { this.Sender = requestorId; this.Args = args; }
protected override void Process(ReinstallArgs args) { FileSystem.FileSystem.Local.Directory.DeleteIfExists(args.TempFolder); }