diff options
| author | Rob Mensching <rob@firegiant.com> | 2020-06-03 02:04:35 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2020-06-03 02:08:57 -0700 |
| commit | 4a8dc1f4d55278abdff056bb2a332ffec0f60c90 (patch) | |
| tree | a60ee521fcbf9886e820f8330a842355f05f1371 /src | |
| parent | 29be4a31c4cf1268d847d4c37c70487f29b84701 (diff) | |
| download | wix-4a8dc1f4d55278abdff056bb2a332ffec0f60c90.tar.gz wix-4a8dc1f4d55278abdff056bb2a332ffec0f60c90.tar.bz2 wix-4a8dc1f4d55278abdff056bb2a332ffec0f60c90.zip | |
Redesign CustomTable tuples to enable file resolution in Core
Diffstat (limited to 'src')
6 files changed, 253 insertions, 186 deletions
diff --git a/src/WixToolset.Data/Tuples/TupleDefinitions.cs b/src/WixToolset.Data/Tuples/TupleDefinitions.cs index 67393f04..a91b3f8f 100644 --- a/src/WixToolset.Data/Tuples/TupleDefinitions.cs +++ b/src/WixToolset.Data/Tuples/TupleDefinitions.cs | |||
| @@ -144,8 +144,9 @@ namespace WixToolset.Data | |||
| 144 | WixComplexReference, | 144 | WixComplexReference, |
| 145 | WixComponentGroup, | 145 | WixComponentGroup, |
| 146 | WixComponentSearch, | 146 | WixComponentSearch, |
| 147 | WixCustomRow, | ||
| 148 | WixCustomTable, | 147 | WixCustomTable, |
| 148 | WixCustomTableCell, | ||
| 149 | WixCustomTableColumn, | ||
| 149 | WixDeltaPatchFile, | 150 | WixDeltaPatchFile, |
| 150 | WixDeltaPatchSymbolPaths, | 151 | WixDeltaPatchSymbolPaths, |
| 151 | WixDependencyProvider, | 152 | WixDependencyProvider, |
| @@ -613,12 +614,15 @@ namespace WixToolset.Data | |||
| 613 | case TupleDefinitionType.WixComponentSearch: | 614 | case TupleDefinitionType.WixComponentSearch: |
| 614 | return TupleDefinitions.WixComponentSearch; | 615 | return TupleDefinitions.WixComponentSearch; |
| 615 | 616 | ||
| 616 | case TupleDefinitionType.WixCustomRow: | ||
| 617 | return TupleDefinitions.WixCustomRow; | ||
| 618 | |||
| 619 | case TupleDefinitionType.WixCustomTable: | 617 | case TupleDefinitionType.WixCustomTable: |
| 620 | return TupleDefinitions.WixCustomTable; | 618 | return TupleDefinitions.WixCustomTable; |
| 621 | 619 | ||
| 620 | case TupleDefinitionType.WixCustomTableCell: | ||
| 621 | return TupleDefinitions.WixCustomTableCell; | ||
| 622 | |||
| 623 | case TupleDefinitionType.WixCustomTableColumn: | ||
| 624 | return TupleDefinitions.WixCustomTableColumn; | ||
| 625 | |||
| 622 | case TupleDefinitionType.WixDeltaPatchFile: | 626 | case TupleDefinitionType.WixDeltaPatchFile: |
| 623 | return TupleDefinitions.WixDeltaPatchFile; | 627 | return TupleDefinitions.WixDeltaPatchFile; |
| 624 | 628 | ||
diff --git a/src/WixToolset.Data/Tuples/WixCustomRowTuple.cs b/src/WixToolset.Data/Tuples/WixCustomRowTuple.cs deleted file mode 100644 index c51089e8..00000000 --- a/src/WixToolset.Data/Tuples/WixCustomRowTuple.cs +++ /dev/null | |||
| @@ -1,56 +0,0 @@ | |||
| 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.Data | ||
| 4 | { | ||
| 5 | using WixToolset.Data.Tuples; | ||
| 6 | |||
| 7 | public static partial class TupleDefinitions | ||
| 8 | { | ||
| 9 | public static readonly IntermediateTupleDefinition WixCustomRow = new IntermediateTupleDefinition( | ||
| 10 | TupleDefinitionType.WixCustomRow, | ||
| 11 | new[] | ||
| 12 | { | ||
| 13 | new IntermediateFieldDefinition(nameof(WixCustomRowTupleFields.Table), IntermediateFieldType.String), | ||
| 14 | new IntermediateFieldDefinition(nameof(WixCustomRowTupleFields.FieldData), IntermediateFieldType.String), | ||
| 15 | }, | ||
| 16 | typeof(WixCustomRowTuple)); | ||
| 17 | } | ||
| 18 | } | ||
| 19 | |||
| 20 | namespace WixToolset.Data.Tuples | ||
| 21 | { | ||
| 22 | public enum WixCustomRowTupleFields | ||
| 23 | { | ||
| 24 | Table, | ||
| 25 | FieldData, | ||
| 26 | } | ||
| 27 | |||
| 28 | public class WixCustomRowTuple : IntermediateTuple | ||
| 29 | { | ||
| 30 | public const char FieldSeparator = '\x85'; | ||
| 31 | |||
| 32 | public WixCustomRowTuple() : base(TupleDefinitions.WixCustomRow, null, null) | ||
| 33 | { | ||
| 34 | } | ||
| 35 | |||
| 36 | public WixCustomRowTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixCustomRow, sourceLineNumber, id) | ||
| 37 | { | ||
| 38 | } | ||
| 39 | |||
| 40 | public IntermediateField this[WixCustomRowTupleFields index] => this.Fields[(int)index]; | ||
| 41 | |||
| 42 | public string Table | ||
| 43 | { | ||
| 44 | get => (string)this.Fields[(int)WixCustomRowTupleFields.Table]; | ||
| 45 | set => this.Set((int)WixCustomRowTupleFields.Table, value); | ||
| 46 | } | ||
| 47 | |||
| 48 | public string FieldData | ||
| 49 | { | ||
| 50 | get => (string)this.Fields[(int)WixCustomRowTupleFields.FieldData]; | ||
| 51 | set => this.Set((int)WixCustomRowTupleFields.FieldData, value); | ||
| 52 | } | ||
| 53 | |||
| 54 | public string[] FieldDataSeparated => this.FieldData.Split(FieldSeparator); | ||
| 55 | } | ||
| 56 | } | ||
diff --git a/src/WixToolset.Data/Tuples/WixCustomTableCellTuple.cs b/src/WixToolset.Data/Tuples/WixCustomTableCellTuple.cs new file mode 100644 index 00000000..18be675e --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixCustomTableCellTuple.cs | |||
| @@ -0,0 +1,68 @@ | |||
| 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.Data | ||
| 4 | { | ||
| 5 | using WixToolset.Data.Tuples; | ||
| 6 | |||
| 7 | public static partial class TupleDefinitions | ||
| 8 | { | ||
| 9 | public static readonly IntermediateTupleDefinition WixCustomTableCell = new IntermediateTupleDefinition( | ||
| 10 | TupleDefinitionType.WixCustomTableCell, | ||
| 11 | new[] | ||
| 12 | { | ||
| 13 | new IntermediateFieldDefinition(nameof(WixCustomTableCellTupleFields.TableRef), IntermediateFieldType.String), | ||
| 14 | new IntermediateFieldDefinition(nameof(WixCustomTableCellTupleFields.ColumnRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(WixCustomTableCellTupleFields.RowId), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(WixCustomTableCellTupleFields.Data), IntermediateFieldType.String), | ||
| 17 | }, | ||
| 18 | typeof(WixCustomTableCellTuple)); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | namespace WixToolset.Data.Tuples | ||
| 23 | { | ||
| 24 | public enum WixCustomTableCellTupleFields | ||
| 25 | { | ||
| 26 | TableRef, | ||
| 27 | ColumnRef, | ||
| 28 | RowId, | ||
| 29 | Data, | ||
| 30 | } | ||
| 31 | |||
| 32 | public class WixCustomTableCellTuple : IntermediateTuple | ||
| 33 | { | ||
| 34 | public WixCustomTableCellTuple() : base(TupleDefinitions.WixCustomTableCell, null, null) | ||
| 35 | { | ||
| 36 | } | ||
| 37 | |||
| 38 | public WixCustomTableCellTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixCustomTableCell, sourceLineNumber, id) | ||
| 39 | { | ||
| 40 | } | ||
| 41 | |||
| 42 | public IntermediateField this[WixCustomTableCellTupleFields index] => this.Fields[(int)index]; | ||
| 43 | |||
| 44 | public string TableRef | ||
| 45 | { | ||
| 46 | get => (string)this.Fields[(int)WixCustomTableCellTupleFields.TableRef]; | ||
| 47 | set => this.Set((int)WixCustomTableCellTupleFields.TableRef, value); | ||
| 48 | } | ||
| 49 | |||
| 50 | public string ColumnRef | ||
| 51 | { | ||
| 52 | get => (string)this.Fields[(int)WixCustomTableCellTupleFields.ColumnRef]; | ||
| 53 | set => this.Set((int)WixCustomTableCellTupleFields.ColumnRef, value); | ||
| 54 | } | ||
| 55 | |||
| 56 | public string RowId | ||
| 57 | { | ||
| 58 | get => (string)this.Fields[(int)WixCustomTableCellTupleFields.RowId]; | ||
| 59 | set => this.Set((int)WixCustomTableCellTupleFields.RowId, value); | ||
| 60 | } | ||
| 61 | |||
| 62 | public string Data | ||
| 63 | { | ||
| 64 | get => (string)this.Fields[(int)WixCustomTableCellTupleFields.Data]; | ||
| 65 | set => this.Set((int)WixCustomTableCellTupleFields.Data, value); | ||
| 66 | } | ||
| 67 | } | ||
| 68 | } | ||
diff --git a/src/WixToolset.Data/Tuples/WixCustomTableColumnTuple.cs b/src/WixToolset.Data/Tuples/WixCustomTableColumnTuple.cs new file mode 100644 index 00000000..66d3e48f --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixCustomTableColumnTuple.cs | |||
| @@ -0,0 +1,173 @@ | |||
| 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.Data | ||
| 4 | { | ||
| 5 | using WixToolset.Data.Tuples; | ||
| 6 | |||
| 7 | public static partial class TupleDefinitions | ||
| 8 | { | ||
| 9 | public static readonly IntermediateTupleDefinition WixCustomTableColumn = new IntermediateTupleDefinition( | ||
| 10 | TupleDefinitionType.WixCustomTableColumn, | ||
| 11 | new[] | ||
| 12 | { | ||
| 13 | new IntermediateFieldDefinition(nameof(WixCustomTableColumnTupleFields.TableRef), IntermediateFieldType.String), | ||
| 14 | new IntermediateFieldDefinition(nameof(WixCustomTableColumnTupleFields.Name), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(WixCustomTableColumnTupleFields.Type), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(WixCustomTableColumnTupleFields.Attributes), IntermediateFieldType.Number), | ||
| 17 | new IntermediateFieldDefinition(nameof(WixCustomTableColumnTupleFields.Width), IntermediateFieldType.Number), | ||
| 18 | new IntermediateFieldDefinition(nameof(WixCustomTableColumnTupleFields.MinValue), IntermediateFieldType.String), | ||
| 19 | new IntermediateFieldDefinition(nameof(WixCustomTableColumnTupleFields.MaxValue), IntermediateFieldType.String), | ||
| 20 | new IntermediateFieldDefinition(nameof(WixCustomTableColumnTupleFields.KeyTable), IntermediateFieldType.String), | ||
| 21 | new IntermediateFieldDefinition(nameof(WixCustomTableColumnTupleFields.KeyColumn), IntermediateFieldType.String), | ||
| 22 | new IntermediateFieldDefinition(nameof(WixCustomTableColumnTupleFields.Category), IntermediateFieldType.String), | ||
| 23 | new IntermediateFieldDefinition(nameof(WixCustomTableColumnTupleFields.Set), IntermediateFieldType.String), | ||
| 24 | new IntermediateFieldDefinition(nameof(WixCustomTableColumnTupleFields.Description), IntermediateFieldType.String), | ||
| 25 | new IntermediateFieldDefinition(nameof(WixCustomTableColumnTupleFields.Modularize), IntermediateFieldType.Number) | ||
| 26 | }, | ||
| 27 | typeof(WixCustomTableColumnTuple)); | ||
| 28 | } | ||
| 29 | } | ||
| 30 | |||
| 31 | namespace WixToolset.Data.Tuples | ||
| 32 | { | ||
| 33 | using System; | ||
| 34 | |||
| 35 | public enum WixCustomTableColumnTupleFields | ||
| 36 | { | ||
| 37 | TableRef, | ||
| 38 | Name, | ||
| 39 | Type, | ||
| 40 | Attributes, | ||
| 41 | Width, | ||
| 42 | MinValue, | ||
| 43 | MaxValue, | ||
| 44 | KeyTable, | ||
| 45 | KeyColumn, | ||
| 46 | Category, | ||
| 47 | Set, | ||
| 48 | Description, | ||
| 49 | Modularize, | ||
| 50 | } | ||
| 51 | |||
| 52 | [Flags] | ||
| 53 | public enum WixCustomTableColumnTupleAttributes | ||
| 54 | { | ||
| 55 | None, | ||
| 56 | PrimaryKey, | ||
| 57 | Localizable, | ||
| 58 | Nullable, | ||
| 59 | Unreal, | ||
| 60 | } | ||
| 61 | |||
| 62 | public enum WixCustomTableColumnModularizeType | ||
| 63 | { | ||
| 64 | None, | ||
| 65 | Column, | ||
| 66 | CompanionFile, | ||
| 67 | Condition, | ||
| 68 | ControlEventArgument, | ||
| 69 | ControlText, | ||
| 70 | Icon, | ||
| 71 | Property, | ||
| 72 | SemicolonDelimited, | ||
| 73 | } | ||
| 74 | |||
| 75 | public class WixCustomTableColumnTuple : IntermediateTuple | ||
| 76 | { | ||
| 77 | public WixCustomTableColumnTuple() : base(TupleDefinitions.WixCustomTableColumn, null, null) | ||
| 78 | { | ||
| 79 | } | ||
| 80 | |||
| 81 | public WixCustomTableColumnTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixCustomTableColumn, sourceLineNumber, id) | ||
| 82 | { | ||
| 83 | } | ||
| 84 | |||
| 85 | public IntermediateField this[WixCustomTableColumnTupleFields index] => this.Fields[(int)index]; | ||
| 86 | |||
| 87 | public string TableRef | ||
| 88 | { | ||
| 89 | get => (string)this.Fields[(int)WixCustomTableColumnTupleFields.TableRef]; | ||
| 90 | set => this.Set((int)WixCustomTableColumnTupleFields.TableRef, value); | ||
| 91 | } | ||
| 92 | |||
| 93 | public string Name | ||
| 94 | { | ||
| 95 | get => (string)this.Fields[(int)WixCustomTableColumnTupleFields.Name]; | ||
| 96 | set => this.Set((int)WixCustomTableColumnTupleFields.Name, value); | ||
| 97 | } | ||
| 98 | |||
| 99 | public IntermediateFieldType Type | ||
| 100 | { | ||
| 101 | get => (IntermediateFieldType)this.Fields[(int)WixCustomTableColumnTupleFields.Type].AsNumber(); | ||
| 102 | set => this.Set((int)WixCustomTableColumnTupleFields.Type, (int)value); | ||
| 103 | } | ||
| 104 | |||
| 105 | public WixCustomTableColumnTupleAttributes Attributes | ||
| 106 | { | ||
| 107 | get => (WixCustomTableColumnTupleAttributes)this.Fields[(int)WixCustomTableColumnTupleFields.Attributes].AsNumber(); | ||
| 108 | set => this.Set((int)WixCustomTableColumnTupleFields.Attributes, (int)value); | ||
| 109 | } | ||
| 110 | |||
| 111 | public int Width | ||
| 112 | { | ||
| 113 | get => (int)this.Fields[(int)WixCustomTableColumnTupleFields.Width]; | ||
| 114 | set => this.Set((int)WixCustomTableColumnTupleFields.Width, value); | ||
| 115 | } | ||
| 116 | |||
| 117 | public long? MinValue | ||
| 118 | { | ||
| 119 | get => (long?)this.Fields[(int)WixCustomTableColumnTupleFields.MinValue]; | ||
| 120 | set => this.Set((int)WixCustomTableColumnTupleFields.MinValue, value); | ||
| 121 | } | ||
| 122 | |||
| 123 | public long? MaxValue | ||
| 124 | { | ||
| 125 | get => (long?)this.Fields[(int)WixCustomTableColumnTupleFields.MaxValue]; | ||
| 126 | set => this.Set((int)WixCustomTableColumnTupleFields.MaxValue, value); | ||
| 127 | } | ||
| 128 | |||
| 129 | public string KeyTable | ||
| 130 | { | ||
| 131 | get => (string)this.Fields[(int)WixCustomTableColumnTupleFields.KeyTable]; | ||
| 132 | set => this.Set((int)WixCustomTableColumnTupleFields.KeyTable, value); | ||
| 133 | } | ||
| 134 | |||
| 135 | public int? KeyColumn | ||
| 136 | { | ||
| 137 | get => (int?)this.Fields[(int)WixCustomTableColumnTupleFields.KeyColumn]; | ||
| 138 | set => this.Set((int)WixCustomTableColumnTupleFields.KeyColumn, value); | ||
| 139 | } | ||
| 140 | |||
| 141 | public string Category | ||
| 142 | { | ||
| 143 | get => (string)this.Fields[(int)WixCustomTableColumnTupleFields.Category]; | ||
| 144 | set => this.Set((int)WixCustomTableColumnTupleFields.Category, value); | ||
| 145 | } | ||
| 146 | |||
| 147 | public string Set | ||
| 148 | { | ||
| 149 | get => (string)this.Fields[(int)WixCustomTableColumnTupleFields.Set]; | ||
| 150 | set => this.Set((int)WixCustomTableColumnTupleFields.Set, value); | ||
| 151 | } | ||
| 152 | |||
| 153 | public string Description | ||
| 154 | { | ||
| 155 | get => (string)this.Fields[(int)WixCustomTableColumnTupleFields.Description]; | ||
| 156 | set => this.Set((int)WixCustomTableColumnTupleFields.Description, value); | ||
| 157 | } | ||
| 158 | |||
| 159 | public WixCustomTableColumnModularizeType? Modularize | ||
| 160 | { | ||
| 161 | get => (WixCustomTableColumnModularizeType?)this.Fields[(int)WixCustomTableColumnTupleFields.Modularize].AsNullableNumber(); | ||
| 162 | set => this.Set((int)WixCustomTableColumnTupleFields.Modularize, (int?)value); | ||
| 163 | } | ||
| 164 | |||
| 165 | public bool PrimaryKey => (this.Attributes & WixCustomTableColumnTupleAttributes.PrimaryKey) == WixCustomTableColumnTupleAttributes.PrimaryKey; | ||
| 166 | |||
| 167 | public bool Localizable => (this.Attributes & WixCustomTableColumnTupleAttributes.Localizable) == WixCustomTableColumnTupleAttributes.Localizable; | ||
| 168 | |||
| 169 | public bool Nullable => (this.Attributes & WixCustomTableColumnTupleAttributes.Nullable) == WixCustomTableColumnTupleAttributes.Nullable; | ||
| 170 | |||
| 171 | public bool Unreal => (this.Attributes & WixCustomTableColumnTupleAttributes.Unreal) == WixCustomTableColumnTupleAttributes.Unreal; | ||
| 172 | } | ||
| 173 | } | ||
diff --git a/src/WixToolset.Data/Tuples/WixCustomTableTuple.cs b/src/WixToolset.Data/Tuples/WixCustomTableTuple.cs index bfb2031a..b0d12a63 100644 --- a/src/WixToolset.Data/Tuples/WixCustomTableTuple.cs +++ b/src/WixToolset.Data/Tuples/WixCustomTableTuple.cs | |||
| @@ -10,18 +10,7 @@ namespace WixToolset.Data | |||
| 10 | TupleDefinitionType.WixCustomTable, | 10 | TupleDefinitionType.WixCustomTable, |
| 11 | new[] | 11 | new[] |
| 12 | { | 12 | { |
| 13 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.ColumnCount), IntermediateFieldType.Number), | ||
| 14 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.ColumnNames), IntermediateFieldType.String), | 13 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.ColumnNames), IntermediateFieldType.String), |
| 15 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.ColumnTypes), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.PrimaryKeys), IntermediateFieldType.String), | ||
| 17 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.MinValues), IntermediateFieldType.String), | ||
| 18 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.MaxValues), IntermediateFieldType.String), | ||
| 19 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.KeyTables), IntermediateFieldType.String), | ||
| 20 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.KeyColumns), IntermediateFieldType.String), | ||
| 21 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Categories), IntermediateFieldType.String), | ||
| 22 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Sets), IntermediateFieldType.String), | ||
| 23 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Descriptions), IntermediateFieldType.String), | ||
| 24 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Modularizations), IntermediateFieldType.String), | ||
| 25 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Unreal), IntermediateFieldType.Bool), | 14 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Unreal), IntermediateFieldType.Bool), |
| 26 | }, | 15 | }, |
| 27 | typeof(WixCustomTableTuple)); | 16 | typeof(WixCustomTableTuple)); |
| @@ -32,23 +21,14 @@ namespace WixToolset.Data.Tuples | |||
| 32 | { | 21 | { |
| 33 | public enum WixCustomTableTupleFields | 22 | public enum WixCustomTableTupleFields |
| 34 | { | 23 | { |
| 35 | ColumnCount, | ||
| 36 | ColumnNames, | 24 | ColumnNames, |
| 37 | ColumnTypes, | ||
| 38 | PrimaryKeys, | ||
| 39 | MinValues, | ||
| 40 | MaxValues, | ||
| 41 | KeyTables, | ||
| 42 | KeyColumns, | ||
| 43 | Categories, | ||
| 44 | Sets, | ||
| 45 | Descriptions, | ||
| 46 | Modularizations, | ||
| 47 | Unreal, | 25 | Unreal, |
| 48 | } | 26 | } |
| 49 | 27 | ||
| 50 | public class WixCustomTableTuple : IntermediateTuple | 28 | public class WixCustomTableTuple : IntermediateTuple |
| 51 | { | 29 | { |
| 30 | public const char ColumnNamesSeparator = '\x85'; | ||
| 31 | |||
| 52 | public WixCustomTableTuple() : base(TupleDefinitions.WixCustomTable, null, null) | 32 | public WixCustomTableTuple() : base(TupleDefinitions.WixCustomTable, null, null) |
| 53 | { | 33 | { |
| 54 | } | 34 | } |
| @@ -59,82 +39,18 @@ namespace WixToolset.Data.Tuples | |||
| 59 | 39 | ||
| 60 | public IntermediateField this[WixCustomTableTupleFields index] => this.Fields[(int)index]; | 40 | public IntermediateField this[WixCustomTableTupleFields index] => this.Fields[(int)index]; |
| 61 | 41 | ||
| 62 | public int ColumnCount | ||
| 63 | { | ||
| 64 | get => (int)this.Fields[(int)WixCustomTableTupleFields.ColumnCount]; | ||
| 65 | set => this.Set((int)WixCustomTableTupleFields.ColumnCount, value); | ||
| 66 | } | ||
| 67 | |||
| 68 | public string ColumnNames | 42 | public string ColumnNames |
| 69 | { | 43 | { |
| 70 | get => (string)this.Fields[(int)WixCustomTableTupleFields.ColumnNames]; | 44 | get => (string)this.Fields[(int)WixCustomTableTupleFields.ColumnNames]; |
| 71 | set => this.Set((int)WixCustomTableTupleFields.ColumnNames, value); | 45 | set => this.Set((int)WixCustomTableTupleFields.ColumnNames, value); |
| 72 | } | 46 | } |
| 73 | 47 | ||
| 74 | public string ColumnTypes | ||
| 75 | { | ||
| 76 | get => (string)this.Fields[(int)WixCustomTableTupleFields.ColumnTypes]; | ||
| 77 | set => this.Set((int)WixCustomTableTupleFields.ColumnTypes, value); | ||
| 78 | } | ||
| 79 | |||
| 80 | public string PrimaryKeys | ||
| 81 | { | ||
| 82 | get => (string)this.Fields[(int)WixCustomTableTupleFields.PrimaryKeys]; | ||
| 83 | set => this.Set((int)WixCustomTableTupleFields.PrimaryKeys, value); | ||
| 84 | } | ||
| 85 | |||
| 86 | public string MinValues | ||
| 87 | { | ||
| 88 | get => (string)this.Fields[(int)WixCustomTableTupleFields.MinValues]; | ||
| 89 | set => this.Set((int)WixCustomTableTupleFields.MinValues, value); | ||
| 90 | } | ||
| 91 | |||
| 92 | public string MaxValues | ||
| 93 | { | ||
| 94 | get => (string)this.Fields[(int)WixCustomTableTupleFields.MaxValues]; | ||
| 95 | set => this.Set((int)WixCustomTableTupleFields.MaxValues, value); | ||
| 96 | } | ||
| 97 | |||
| 98 | public string KeyTables | ||
| 99 | { | ||
| 100 | get => (string)this.Fields[(int)WixCustomTableTupleFields.KeyTables]; | ||
| 101 | set => this.Set((int)WixCustomTableTupleFields.KeyTables, value); | ||
| 102 | } | ||
| 103 | |||
| 104 | public string KeyColumns | ||
| 105 | { | ||
| 106 | get => (string)this.Fields[(int)WixCustomTableTupleFields.KeyColumns]; | ||
| 107 | set => this.Set((int)WixCustomTableTupleFields.KeyColumns, value); | ||
| 108 | } | ||
| 109 | |||
| 110 | public string Categories | ||
| 111 | { | ||
| 112 | get => (string)this.Fields[(int)WixCustomTableTupleFields.Categories]; | ||
| 113 | set => this.Set((int)WixCustomTableTupleFields.Categories, value); | ||
| 114 | } | ||
| 115 | |||
| 116 | public string Sets | ||
| 117 | { | ||
| 118 | get => (string)this.Fields[(int)WixCustomTableTupleFields.Sets]; | ||
| 119 | set => this.Set((int)WixCustomTableTupleFields.Sets, value); | ||
| 120 | } | ||
| 121 | |||
| 122 | public string Descriptions | ||
| 123 | { | ||
| 124 | get => (string)this.Fields[(int)WixCustomTableTupleFields.Descriptions]; | ||
| 125 | set => this.Set((int)WixCustomTableTupleFields.Descriptions, value); | ||
| 126 | } | ||
| 127 | |||
| 128 | public string Modularizations | ||
| 129 | { | ||
| 130 | get => (string)this.Fields[(int)WixCustomTableTupleFields.Modularizations]; | ||
| 131 | set => this.Set((int)WixCustomTableTupleFields.Modularizations, value); | ||
| 132 | } | ||
| 133 | |||
| 134 | public bool Unreal | 48 | public bool Unreal |
| 135 | { | 49 | { |
| 136 | get => (bool)this.Fields[(int)WixCustomTableTupleFields.Unreal]; | 50 | get => (bool)this.Fields[(int)WixCustomTableTupleFields.Unreal]; |
| 137 | set => this.Set((int)WixCustomTableTupleFields.Unreal, value); | 51 | set => this.Set((int)WixCustomTableTupleFields.Unreal, value); |
| 138 | } | 52 | } |
| 53 | |||
| 54 | public string[] ColumnNamesSeparated => this.ColumnNames.Split(ColumnNamesSeparator); | ||
| 139 | } | 55 | } |
| 140 | } | 56 | } |
diff --git a/src/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs b/src/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs index ceeaf2fa..86db0f0a 100644 --- a/src/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs +++ b/src/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs | |||
| @@ -1733,42 +1733,6 @@ namespace WixToolset.Data.WindowsInstaller | |||
| 1733 | tupleIdIsPrimaryKey: false | 1733 | tupleIdIsPrimaryKey: false |
| 1734 | ); | 1734 | ); |
| 1735 | 1735 | ||
| 1736 | public static readonly TableDefinition WixCustomRow = new TableDefinition( | ||
| 1737 | "WixCustomRow", | ||
| 1738 | TupleDefinitions.WixCustomRow, | ||
| 1739 | new[] | ||
| 1740 | { | ||
| 1741 | new ColumnDefinition("Table", ColumnType.String, 62, primaryKey: false, nullable: false, ColumnCategory.Unknown), | ||
| 1742 | new ColumnDefinition("FieldData", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Unknown), | ||
| 1743 | }, | ||
| 1744 | unreal: true, | ||
| 1745 | tupleIdIsPrimaryKey: false | ||
| 1746 | ); | ||
| 1747 | |||
| 1748 | public static readonly TableDefinition WixCustomTable = new TableDefinition( | ||
| 1749 | "WixCustomTable", | ||
| 1750 | TupleDefinitions.WixCustomTable, | ||
| 1751 | new[] | ||
| 1752 | { | ||
| 1753 | new ColumnDefinition("Table", ColumnType.String, 62, primaryKey: true, nullable: false, ColumnCategory.Unknown), | ||
| 1754 | new ColumnDefinition("ColumnCount", ColumnType.Number, 2, primaryKey: false, nullable: false, ColumnCategory.Unknown), | ||
| 1755 | new ColumnDefinition("ColumnNames", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Unknown), | ||
| 1756 | new ColumnDefinition("ColumnTypes", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Unknown), | ||
| 1757 | new ColumnDefinition("PrimaryKeys", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Unknown), | ||
| 1758 | new ColumnDefinition("MinValues", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Unknown), | ||
| 1759 | new ColumnDefinition("MaxValues", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Unknown), | ||
| 1760 | new ColumnDefinition("KeyTables", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Unknown), | ||
| 1761 | new ColumnDefinition("KeyColumns", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Unknown), | ||
| 1762 | new ColumnDefinition("Categories", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Unknown), | ||
| 1763 | new ColumnDefinition("Sets", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Unknown), | ||
| 1764 | new ColumnDefinition("Descriptions", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Unknown), | ||
| 1765 | new ColumnDefinition("Modularizations", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Unknown), | ||
| 1766 | new ColumnDefinition("BootstrapperApplicationData", ColumnType.Number, 2, primaryKey: false, nullable: false, ColumnCategory.Unknown), | ||
| 1767 | }, | ||
| 1768 | unreal: true, | ||
| 1769 | tupleIdIsPrimaryKey: true | ||
| 1770 | ); | ||
| 1771 | |||
| 1772 | public static readonly TableDefinition WixDirectory = new TableDefinition( | 1736 | public static readonly TableDefinition WixDirectory = new TableDefinition( |
| 1773 | "WixDirectory", | 1737 | "WixDirectory", |
| 1774 | null, | 1738 | null, |
| @@ -2325,8 +2289,6 @@ namespace WixToolset.Data.WindowsInstaller | |||
| 2325 | WixComplexReference, | 2289 | WixComplexReference, |
| 2326 | WixComponentGroup, | 2290 | WixComponentGroup, |
| 2327 | WixControl, | 2291 | WixControl, |
| 2328 | WixCustomRow, | ||
| 2329 | WixCustomTable, | ||
| 2330 | WixDirectory, | 2292 | WixDirectory, |
| 2331 | WixEnsureTable, | 2293 | WixEnsureTable, |
| 2332 | WixFeatureGroup, | 2294 | WixFeatureGroup, |
