diff options
| author | Rob Mensching <rob@firegiant.com> | 2020-06-25 14:43:50 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2020-06-25 14:50:31 -0700 |
| commit | 38afa9e7bc7eacc021f8805f607368a05751e3c3 (patch) | |
| tree | 803b0a8d9a06a7d6f7c4df408437017ae21a883e /src/WixToolset.Core.WindowsInstaller/ExtensibilityServices/WindowsInstallerBackendHelper.cs | |
| parent | 8968578d50858721317d410549a9f9b5c62bf1f7 (diff) | |
| download | wix-38afa9e7bc7eacc021f8805f607368a05751e3c3.tar.gz wix-38afa9e7bc7eacc021f8805f607368a05751e3c3.tar.bz2 wix-38afa9e7bc7eacc021f8805f607368a05751e3c3.zip | |
The Great Tuple to Symbol Rename (tm)
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/ExtensibilityServices/WindowsInstallerBackendHelper.cs')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/ExtensibilityServices/WindowsInstallerBackendHelper.cs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/ExtensibilityServices/WindowsInstallerBackendHelper.cs b/src/WixToolset.Core.WindowsInstaller/ExtensibilityServices/WindowsInstallerBackendHelper.cs index a1df335c..0082bc7c 100644 --- a/src/WixToolset.Core.WindowsInstaller/ExtensibilityServices/WindowsInstallerBackendHelper.cs +++ b/src/WixToolset.Core.WindowsInstaller/ExtensibilityServices/WindowsInstallerBackendHelper.cs | |||
| @@ -9,34 +9,34 @@ namespace WixToolset.Core.WindowsInstaller.ExtensibilityServices | |||
| 9 | 9 | ||
| 10 | internal class WindowsInstallerBackendHelper : IWindowsInstallerBackendHelper | 10 | internal class WindowsInstallerBackendHelper : IWindowsInstallerBackendHelper |
| 11 | { | 11 | { |
| 12 | public Row CreateRow(IntermediateSection section, IntermediateTuple tuple, WindowsInstallerData output, TableDefinition tableDefinition) | 12 | public Row CreateRow(IntermediateSection section, IntermediateSymbol symbol, WindowsInstallerData output, TableDefinition tableDefinition) |
| 13 | { | 13 | { |
| 14 | var table = output.EnsureTable(tableDefinition); | 14 | var table = output.EnsureTable(tableDefinition); |
| 15 | 15 | ||
| 16 | var row = table.CreateRow(tuple.SourceLineNumbers); | 16 | var row = table.CreateRow(symbol.SourceLineNumbers); |
| 17 | row.SectionId = section.Id; | 17 | row.SectionId = section.Id; |
| 18 | 18 | ||
| 19 | return row; | 19 | return row; |
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | public bool TryAddTupleToOutputMatchingTableDefinitions(IntermediateSection section, IntermediateTuple tuple, WindowsInstallerData output, TableDefinitionCollection tableDefinitions) | 22 | public bool TryAddSymbolToOutputMatchingTableDefinitions(IntermediateSection section, IntermediateSymbol symbol, WindowsInstallerData output, TableDefinitionCollection tableDefinitions) |
| 23 | { | 23 | { |
| 24 | var tableDefinition = tableDefinitions.FirstOrDefault(t => t.TupleDefinition?.Name == tuple.Definition.Name); | 24 | var tableDefinition = tableDefinitions.FirstOrDefault(t => t.SymbolDefinition?.Name == symbol.Definition.Name); |
| 25 | if (tableDefinition == null) | 25 | if (tableDefinition == null) |
| 26 | { | 26 | { |
| 27 | return false; | 27 | return false; |
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | var row = this.CreateRow(section, tuple, output, tableDefinition); | 30 | var row = this.CreateRow(section, symbol, output, tableDefinition); |
| 31 | var rowOffset = 0; | 31 | var rowOffset = 0; |
| 32 | 32 | ||
| 33 | if (tableDefinition.TupleIdIsPrimaryKey) | 33 | if (tableDefinition.SymbolIdIsPrimaryKey) |
| 34 | { | 34 | { |
| 35 | row[0] = tuple.Id.Id; | 35 | row[0] = symbol.Id.Id; |
| 36 | rowOffset = 1; | 36 | rowOffset = 1; |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | for (var i = 0; i < tuple.Fields.Length; ++i) | 39 | for (var i = 0; i < symbol.Fields.Length; ++i) |
| 40 | { | 40 | { |
| 41 | if (i < tableDefinition.Columns.Length) | 41 | if (i < tableDefinition.Columns.Length) |
| 42 | { | 42 | { |
| @@ -45,11 +45,11 @@ namespace WixToolset.Core.WindowsInstaller.ExtensibilityServices | |||
| 45 | switch (column.Type) | 45 | switch (column.Type) |
| 46 | { | 46 | { |
| 47 | case ColumnType.Number: | 47 | case ColumnType.Number: |
| 48 | row[i + rowOffset] = column.Nullable ? tuple.AsNullableNumber(i) : tuple.AsNumber(i); | 48 | row[i + rowOffset] = column.Nullable ? symbol.AsNullableNumber(i) : symbol.AsNumber(i); |
| 49 | break; | 49 | break; |
| 50 | 50 | ||
| 51 | default: | 51 | default: |
| 52 | row[i + rowOffset] = tuple.AsString(i); | 52 | row[i + rowOffset] = symbol.AsString(i); |
| 53 | break; | 53 | break; |
| 54 | } | 54 | } |
| 55 | } | 55 | } |
