aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2021-03-26 12:59:03 -0700
committerRob Mensching <rob@firegiant.com>2021-04-02 14:58:00 -0700
commit9cca339473d77c7036035f949239f5231c325968 (patch)
tree342399ad52d1eb8102be17c71a12242c566fca25 /src/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs
parent67bcf306aa020c5480b6dd28eab5db3d49264585 (diff)
downloadwix-9cca339473d77c7036035f949239f5231c325968.tar.gz
wix-9cca339473d77c7036035f949239f5231c325968.tar.bz2
wix-9cca339473d77c7036035f949239f5231c325968.zip
Integrate the IntermediateSection and IntermediateSymbol mutable changes
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs')
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs
index 5e72ec5c..94fa0a6a 100644
--- a/src/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs
+++ b/src/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs
@@ -173,21 +173,12 @@ namespace WixToolset.Core.WindowsInstaller.Bind
173 } 173 }
174 174
175 // Remove all existing WixActionSymbols from the section then add the 175 // Remove all existing WixActionSymbols from the section then add the
176 // scheduled actions back to the section. Note: we add the indices in 176 // scheduled actions back to the section.
177 // reverse order to make it easy to remove them from the list later. 177 var removeActionSymbols = this.Section.Symbols.Where(s => s.Definition.Type == SymbolDefinitionType.WixAction).ToList();
178 var removeIndices = new List<int>();
179 for (var i = this.Section.Symbols.Count - 1; i >= 0; --i)
180 {
181 var symbol = this.Section.Symbols[i];
182 if (symbol.Definition.Type == SymbolDefinitionType.WixAction)
183 {
184 removeIndices.Add(i);
185 }
186 }
187 178
188 foreach (var removeIndex in removeIndices) 179 foreach (var removeSymbol in removeActionSymbols)
189 { 180 {
190 this.Section.Symbols.RemoveAt(removeIndex); 181 this.Section.RemoveSymbol(removeSymbol);
191 } 182 }
192 183
193 foreach (var action in scheduledActionSymbols) 184 foreach (var action in scheduledActionSymbols)