diff options
Diffstat (limited to 'src/WixToolset.Core.Burn')
| -rw-r--r-- | src/WixToolset.Core.Burn/Bundles/CreateBootstrapperApplicationManifestCommand.cs | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/src/WixToolset.Core.Burn/Bundles/CreateBootstrapperApplicationManifestCommand.cs b/src/WixToolset.Core.Burn/Bundles/CreateBootstrapperApplicationManifestCommand.cs index 2a230a90..dba2a9ba 100644 --- a/src/WixToolset.Core.Burn/Bundles/CreateBootstrapperApplicationManifestCommand.cs +++ b/src/WixToolset.Core.Burn/Bundles/CreateBootstrapperApplicationManifestCommand.cs | |||
| @@ -281,20 +281,20 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 281 | } | 281 | } |
| 282 | 282 | ||
| 283 | var dataTablesById = this.Section.Tuples.OfType<WixCustomTableTuple>() | 283 | var dataTablesById = this.Section.Tuples.OfType<WixCustomTableTuple>() |
| 284 | .Where(t => t.Unreal && t.Id != null) | 284 | .Where(t => t.Unreal && t.Id != null) |
| 285 | .ToDictionary(t => t.Id.Id); | 285 | .ToDictionary(t => t.Id.Id); |
| 286 | var dataRowsByTable = this.Section.Tuples.OfType<WixCustomRowTuple>() | 286 | var cellsByTable = this.Section.Tuples.OfType<WixCustomTableCellTuple>() |
| 287 | .GroupBy(t => t.Table); | 287 | .GroupBy(t => t.TableRef); |
| 288 | foreach (var tableDataRows in dataRowsByTable) | 288 | foreach (var tableCells in cellsByTable) |
| 289 | { | 289 | { |
| 290 | var tableName = tableDataRows.Key; | 290 | var tableName = tableCells.Key; |
| 291 | if (!dataTablesById.TryGetValue(tableName, out var tableTuple)) | 291 | if (!dataTablesById.TryGetValue(tableName, out var tableTuple)) |
| 292 | { | 292 | { |
| 293 | // This should have been a linker error. | 293 | // This should have been a linker error. |
| 294 | continue; | 294 | continue; |
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | var columnNames = tableTuple.ColumnNames.Split('\t'); | 297 | var columnNames = tableTuple.ColumnNamesSeparated; |
| 298 | 298 | ||
| 299 | // We simply assert that the table (and field) name is valid, because | 299 | // We simply assert that the table (and field) name is valid, because |
| 300 | // this is up to the extension developer to get right. An author will | 300 | // this is up to the extension developer to get right. An author will |
| @@ -307,17 +307,18 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 307 | } | 307 | } |
| 308 | #endif // DEBUG | 308 | #endif // DEBUG |
| 309 | 309 | ||
| 310 | foreach (var rowTuple in tableDataRows) | 310 | foreach (var rowCells in tableCells.GroupBy(t => t.RowId)) |
| 311 | { | 311 | { |
| 312 | var rowDataByColumn = rowCells.ToDictionary(t => t.ColumnRef, t => t.Data); | ||
| 313 | |||
| 312 | writer.WriteStartElement(tableName); | 314 | writer.WriteStartElement(tableName); |
| 313 | 315 | ||
| 314 | //var rowFields = rowTuple.FieldDataSeparated; | 316 | // Write all row data as attributes in table column order. |
| 315 | foreach (var field in rowTuple.FieldDataSeparated) | 317 | foreach (var column in columnNames) |
| 316 | { | 318 | { |
| 317 | var splitField = field.Split(ColonCharacter, 2); | 319 | if (rowDataByColumn.TryGetValue(column, out var data)) |
| 318 | if (splitField.Length == 2) | ||
| 319 | { | 320 | { |
| 320 | writer.WriteAttributeString(splitField[0], splitField[1]); | 321 | writer.WriteAttributeString(column, data); |
| 321 | } | 322 | } |
| 322 | } | 323 | } |
| 323 | 324 | ||
