diff options
| author | Rob Mensching <rob@firegiant.com> | 2020-06-06 15:42:06 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2020-06-08 16:37:14 -0700 |
| commit | 703546818ada54faa0bac33441370291b8e4bf6b (patch) | |
| tree | b230b1c2c243a4976c9516fc87246188a58e80fa /src/WixToolset.Core.WindowsInstaller/Bind/AddBackSuppressedSequenceTablesCommand.cs | |
| parent | 2c3793752060e50fe2049d860a8ccb4a2475414c (diff) | |
| download | wix-703546818ada54faa0bac33441370291b8e4bf6b.tar.gz wix-703546818ada54faa0bac33441370291b8e4bf6b.tar.bz2 wix-703546818ada54faa0bac33441370291b8e4bf6b.zip | |
Fix typo in class name
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/AddBackSuppressedSequenceTablesCommand.cs')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Bind/AddBackSuppressedSequenceTablesCommand.cs | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/AddBackSuppressedSequenceTablesCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/AddBackSuppressedSequenceTablesCommand.cs new file mode 100644 index 00000000..d83e3684 --- /dev/null +++ b/src/WixToolset.Core.WindowsInstaller/Bind/AddBackSuppressedSequenceTablesCommand.cs | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolset.Core.WindowsInstaller.Bind | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | using System.Collections.Generic; | ||
| 7 | using WixToolset.Data.Tuples; | ||
| 8 | using WixToolset.Data.WindowsInstaller; | ||
| 9 | |||
| 10 | /// <summary> | ||
| 11 | /// Add back possibly suppressed sequence tables since all sequence tables must be present | ||
| 12 | /// for the merge process to work. We'll drop the suppressed sequence tables again as | ||
| 13 | /// necessary. | ||
| 14 | /// </summary> | ||
| 15 | internal class AddBackSuppressedSequenceTablesCommand | ||
| 16 | { | ||
| 17 | public AddBackSuppressedSequenceTablesCommand(WindowsInstallerData output, TableDefinitionCollection tableDefinitions) | ||
| 18 | { | ||
| 19 | this.Output = output; | ||
| 20 | this.TableDefinitions = tableDefinitions; | ||
| 21 | } | ||
| 22 | |||
| 23 | private WindowsInstallerData Output { get; } | ||
| 24 | |||
| 25 | private TableDefinitionCollection TableDefinitions { get; } | ||
| 26 | |||
| 27 | public IEnumerable<string> SuppressedTableNames { get; private set; } | ||
| 28 | |||
| 29 | public IEnumerable<string> Execute() | ||
| 30 | { | ||
| 31 | var suppressedTableNames = new HashSet<string>(); | ||
| 32 | |||
| 33 | foreach (SequenceTable sequence in Enum.GetValues(typeof(SequenceTable))) | ||
| 34 | { | ||
| 35 | var sequenceTableName = sequence.WindowsInstallerTableName(); | ||
| 36 | var sequenceTable = this.Output.Tables[sequenceTableName]; | ||
| 37 | |||
| 38 | if (null == sequenceTable) | ||
| 39 | { | ||
| 40 | sequenceTable = this.Output.EnsureTable(this.TableDefinitions[sequenceTableName]); | ||
| 41 | } | ||
| 42 | |||
| 43 | if (0 == sequenceTable.Rows.Count) | ||
| 44 | { | ||
| 45 | suppressedTableNames.Add(sequenceTableName); | ||
| 46 | } | ||
| 47 | } | ||
| 48 | |||
| 49 | return this.SuppressedTableNames = suppressedTableNames; | ||
| 50 | } | ||
| 51 | } | ||
| 52 | } | ||
