From 8cbfc326cccf8d9b3b63cb6f752fc770f7dee0fc Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Tue, 29 Jun 2021 19:14:02 -0500 Subject: Expose overridable variable APIs in balutil and Mba.Core. Fixes #4777 --- src/test/burn/TestBA/TestBA.cs | 6 +++--- src/test/burn/WixToolset.WixBA/InstallationViewModel.cs | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/test') diff --git a/src/test/burn/TestBA/TestBA.cs b/src/test/burn/TestBA/TestBA.cs index 09378bc5..5c70253d 100644 --- a/src/test/burn/TestBA/TestBA.cs +++ b/src/test/burn/TestBA/TestBA.cs @@ -74,8 +74,6 @@ namespace WixToolset.Test.BA return; } - base.OnStartup(args); - this.action = this.Command.Action; this.TestVariables(); @@ -84,7 +82,7 @@ namespace WixToolset.Test.BA List verifyArguments = this.ReadVerifyArguments(); - foreach (string arg in this.Command.CommandLineArgs) + foreach (string arg in BootstrapperCommand.ParseCommandLineToArgs(this.Command.CommandLine)) { // If we're not in the update already, process the updatebundle. if (this.Command.Relation != RelationType.Update && arg.StartsWith("-updatebundle:", StringComparison.OrdinalIgnoreCase)) @@ -116,6 +114,8 @@ namespace WixToolset.Test.BA return; } + base.OnStartup(args); + int redetectCount; string redetect = this.ReadPackageAction(null, "RedetectCount"); if (String.IsNullOrEmpty(redetect) || !Int32.TryParse(redetect, out redetectCount)) diff --git a/src/test/burn/WixToolset.WixBA/InstallationViewModel.cs b/src/test/burn/WixToolset.WixBA/InstallationViewModel.cs index 410ab110..14ea561f 100644 --- a/src/test/burn/WixToolset.WixBA/InstallationViewModel.cs +++ b/src/test/burn/WixToolset.WixBA/InstallationViewModel.cs @@ -256,7 +256,7 @@ namespace WixToolset.WixBA public bool IsComplete { - get { return IsSuccessfulCompletion || IsFailedCompletion; } + get { return this.IsSuccessfulCompletion || this.IsFailedCompletion; } } public bool IsSuccessfulCompletion @@ -358,7 +358,7 @@ namespace WixToolset.WixBA { this.root.Canceled = false; WixBA.Plan(WixBA.Model.PlannedAction); - }, param => IsFailedCompletion); + }, param => this.IsFailedCompletion); } return this.tryAgainCommand; @@ -456,7 +456,7 @@ namespace WixToolset.WixBA // Force all commands to reevaluate CanExecute. // InvalidateRequerySuggested must be run on the UI thread. - root.Dispatcher.Invoke(new Action(CommandManager.InvalidateRequerySuggested)); + this.root.Dispatcher.Invoke(new Action(CommandManager.InvalidateRequerySuggested)); } private void PlanPackageBegin(object sender, PlanPackageBeginEventArgs e) @@ -639,7 +639,7 @@ namespace WixToolset.WixBA WixBA.Dispatcher.BeginInvoke(new Action(WixBA.View.Close)); return; } - else if (root.AutoClose) + else if (this.root.AutoClose) { // Automatically closing since the user clicked the X button. WixBA.Dispatcher.BeginInvoke(new Action(WixBA.View.Close)); @@ -648,13 +648,13 @@ namespace WixToolset.WixBA // Force all commands to reevaluate CanExecute. // InvalidateRequerySuggested must be run on the UI thread. - root.Dispatcher.Invoke(new Action(CommandManager.InvalidateRequerySuggested)); + this.root.Dispatcher.Invoke(new Action(CommandManager.InvalidateRequerySuggested)); } private void ParseCommandLine() { // Get array of arguments based on the system parsing algorithm. - string[] args = WixBA.Model.Command.CommandLineArgs; + string[] args = BootstrapperCommand.ParseCommandLineToArgs(WixBA.Model.Command.CommandLine); for (int i = 0; i < args.Length; ++i) { if (args[i].StartsWith("InstallFolder=", StringComparison.InvariantCultureIgnoreCase)) -- cgit v1.2.3-55-g6feb