diff options
| author | Rob Mensching <rob@firegiant.com> | 2020-01-13 14:41:17 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2020-02-05 16:15:47 -0800 |
| commit | 6e2e67ab55c75f4655397588c0dcc64f50d22f92 (patch) | |
| tree | 01290e7b07ec6e4e4384e8fed568f14283f65d61 /src/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs | |
| parent | c9c3ab2776252d3131fea561bd3f3fac8c045f5e (diff) | |
| download | wix-6e2e67ab55c75f4655397588c0dcc64f50d22f92.tar.gz wix-6e2e67ab55c75f4655397588c0dcc64f50d22f92.tar.bz2 wix-6e2e67ab55c75f4655397588c0dcc64f50d22f92.zip | |
Remove WixActionRowCollection and duplicate actions.xml
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs index 23a5fcba..e9b0d612 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs | |||
| @@ -18,16 +18,12 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 18 | this.Section = section; | 18 | this.Section = section; |
| 19 | 19 | ||
| 20 | this.RelativeActionsForActions = new Dictionary<string, RelativeActions>(); | 20 | this.RelativeActionsForActions = new Dictionary<string, RelativeActions>(); |
| 21 | |||
| 22 | this.StandardActionsById = WindowsInstallerStandard.StandardActions().ToDictionary(a => a.Id.Id); | ||
| 23 | } | 21 | } |
| 24 | 22 | ||
| 25 | private IntermediateSection Section { get; } | 23 | private IntermediateSection Section { get; } |
| 26 | 24 | ||
| 27 | private Dictionary<string, RelativeActions> RelativeActionsForActions { get; } | 25 | private Dictionary<string, RelativeActions> RelativeActionsForActions { get; } |
| 28 | 26 | ||
| 29 | private Dictionary<string, WixActionTuple> StandardActionsById { get; } | ||
| 30 | |||
| 31 | public IMessaging Messaging { private get; set; } | 27 | public IMessaging Messaging { private get; set; } |
| 32 | 28 | ||
| 33 | /// <summary> | 29 | /// <summary> |
| @@ -63,7 +59,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 63 | // Unsequenced action (allowed for certain standard actions). | 59 | // Unsequenced action (allowed for certain standard actions). |
| 64 | if (null == actionTuple.Before && null == actionTuple.After && !actionTuple.Sequence.HasValue) | 60 | if (null == actionTuple.Before && null == actionTuple.After && !actionTuple.Sequence.HasValue) |
| 65 | { | 61 | { |
| 66 | if (this.StandardActionsById.TryGetValue(actionTuple.Id.Id, out var standardAction)) | 62 | if (WindowsInstallerStandard.TryGetStandardAction(actionTuple.Id.Id, out var standardAction)) |
| 67 | { | 63 | { |
| 68 | // Populate the sequence from the standard action | 64 | // Populate the sequence from the standard action |
| 69 | actionTuple.Sequence = standardAction.Sequence; | 65 | actionTuple.Sequence = standardAction.Sequence; |
| @@ -154,7 +150,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 154 | // on the presence of a particular table. | 150 | // on the presence of a particular table. |
| 155 | if (requiredActionTuples.ContainsKey("InstallExecuteSequence/DuplicateFiles") && !requiredActionTuples.ContainsKey("InstallExecuteSequence/InstallFiles")) | 151 | if (requiredActionTuples.ContainsKey("InstallExecuteSequence/DuplicateFiles") && !requiredActionTuples.ContainsKey("InstallExecuteSequence/InstallFiles")) |
| 156 | { | 152 | { |
| 157 | var standardAction = this.StandardActionsById["InstallExecuteSequence/InstallFiles"]; | 153 | WindowsInstallerStandard.TryGetStandardAction("InstallExecuteSequence/InstallFiles", out var standardAction); |
| 158 | requiredActionTuples.Add(standardAction.Id.Id, standardAction); | 154 | requiredActionTuples.Add(standardAction.Id.Id, standardAction); |
| 159 | } | 155 | } |
| 160 | 156 | ||
| @@ -201,8 +197,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 201 | 197 | ||
| 202 | foreach (var actionId in requiredActionIds) | 198 | foreach (var actionId in requiredActionIds) |
| 203 | { | 199 | { |
| 204 | var standardAction = this.StandardActionsById[actionId]; | 200 | WindowsInstallerStandard.TryGetStandardAction(actionId, out var standardAction); |
| 205 | |||
| 206 | overridableActionTuples.Add(standardAction.Id.Id, standardAction); | 201 | overridableActionTuples.Add(standardAction.Id.Id, standardAction); |
| 207 | } | 202 | } |
| 208 | 203 | ||
| @@ -597,7 +592,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 597 | if (!requiredActionTuples.TryGetValue(parentActionKey, out var parentActionTuple)) | 592 | if (!requiredActionTuples.TryGetValue(parentActionKey, out var parentActionTuple)) |
| 598 | { | 593 | { |
| 599 | // If the missing parent action is a standard action (with a suggested sequence number), add it. | 594 | // If the missing parent action is a standard action (with a suggested sequence number), add it. |
| 600 | if (this.StandardActionsById.TryGetValue(parentActionKey, out parentActionTuple)) | 595 | if (WindowsInstallerStandard.TryGetStandardAction(parentActionKey, out parentActionTuple)) |
| 601 | { | 596 | { |
| 602 | // Create a clone to avoid modifying the static copy of the object. | 597 | // Create a clone to avoid modifying the static copy of the object. |
| 603 | // TODO: consider this: parentActionTuple = parentActionTuple.Clone(); | 598 | // TODO: consider this: parentActionTuple = parentActionTuple.Clone(); |
