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/WixToolset.Data/Tuples/WixCustomTableTuple.cs | |
| 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/WixToolset.Data/Tuples/WixCustomTableTuple.cs')
| -rw-r--r-- | src/WixToolset.Data/Tuples/WixCustomTableTuple.cs | 92 |
1 files changed, 4 insertions, 88 deletions
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 | } |
