diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-11-01 10:56:09 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-11-01 10:56:09 -0700 |
| commit | 69b15d96cebdbb7201b1849b4f62786633d70b8d (patch) | |
| tree | 4b65de8679e4b4ab81b69edcccbac1ae9f55a16d /src/WixToolset.Data/Tuples/WixCustomTableTuple.cs | |
| parent | a8656a87887d6cb2c54f4bbeacee37f7074f1032 (diff) | |
| download | wix-69b15d96cebdbb7201b1849b4f62786633d70b8d.tar.gz wix-69b15d96cebdbb7201b1849b4f62786633d70b8d.tar.bz2 wix-69b15d96cebdbb7201b1849b4f62786633d70b8d.zip | |
Introduce WiX Intermediate Representation
Diffstat (limited to 'src/WixToolset.Data/Tuples/WixCustomTableTuple.cs')
| -rw-r--r-- | src/WixToolset.Data/Tuples/WixCustomTableTuple.cs | 148 |
1 files changed, 148 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Tuples/WixCustomTableTuple.cs b/src/WixToolset.Data/Tuples/WixCustomTableTuple.cs new file mode 100644 index 00000000..58266aff --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixCustomTableTuple.cs | |||
| @@ -0,0 +1,148 @@ | |||
| 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 WixCustomTable = new IntermediateTupleDefinition( | ||
| 10 | TupleDefinitionType.WixCustomTable, | ||
| 11 | new[] | ||
| 12 | { | ||
| 13 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Table), IntermediateFieldType.String), | ||
| 14 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.ColumnCount), IntermediateFieldType.Number), | ||
| 15 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.ColumnNames), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.ColumnTypes), IntermediateFieldType.String), | ||
| 17 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.PrimaryKeys), IntermediateFieldType.String), | ||
| 18 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.MinValues), IntermediateFieldType.String), | ||
| 19 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.MaxValues), IntermediateFieldType.String), | ||
| 20 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.KeyTables), IntermediateFieldType.String), | ||
| 21 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.KeyColumns), IntermediateFieldType.String), | ||
| 22 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Categories), IntermediateFieldType.String), | ||
| 23 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Sets), IntermediateFieldType.String), | ||
| 24 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Descriptions), IntermediateFieldType.String), | ||
| 25 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Modularizations), IntermediateFieldType.String), | ||
| 26 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.BootstrapperApplicationData), IntermediateFieldType.Number), | ||
| 27 | }, | ||
| 28 | typeof(WixCustomTableTuple)); | ||
| 29 | } | ||
| 30 | } | ||
| 31 | |||
| 32 | namespace WixToolset.Data.Tuples | ||
| 33 | { | ||
| 34 | public enum WixCustomTableTupleFields | ||
| 35 | { | ||
| 36 | Table, | ||
| 37 | ColumnCount, | ||
| 38 | ColumnNames, | ||
| 39 | ColumnTypes, | ||
| 40 | PrimaryKeys, | ||
| 41 | MinValues, | ||
| 42 | MaxValues, | ||
| 43 | KeyTables, | ||
| 44 | KeyColumns, | ||
| 45 | Categories, | ||
| 46 | Sets, | ||
| 47 | Descriptions, | ||
| 48 | Modularizations, | ||
| 49 | BootstrapperApplicationData, | ||
| 50 | } | ||
| 51 | |||
| 52 | public class WixCustomTableTuple : IntermediateTuple | ||
| 53 | { | ||
| 54 | public WixCustomTableTuple() : base(TupleDefinitions.WixCustomTable, null, null) | ||
| 55 | { | ||
| 56 | } | ||
| 57 | |||
| 58 | public WixCustomTableTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixCustomTable, sourceLineNumber, id) | ||
| 59 | { | ||
| 60 | } | ||
| 61 | |||
| 62 | public IntermediateField this[WixCustomTableTupleFields index] => this.Fields[(int)index]; | ||
| 63 | |||
| 64 | public string Table | ||
| 65 | { | ||
| 66 | get => (string)this.Fields[(int)WixCustomTableTupleFields.Table]?.Value; | ||
| 67 | set => this.Set((int)WixCustomTableTupleFields.Table, value); | ||
| 68 | } | ||
| 69 | |||
| 70 | public int ColumnCount | ||
| 71 | { | ||
| 72 | get => (int)this.Fields[(int)WixCustomTableTupleFields.ColumnCount]?.Value; | ||
| 73 | set => this.Set((int)WixCustomTableTupleFields.ColumnCount, value); | ||
| 74 | } | ||
| 75 | |||
| 76 | public string ColumnNames | ||
| 77 | { | ||
| 78 | get => (string)this.Fields[(int)WixCustomTableTupleFields.ColumnNames]?.Value; | ||
| 79 | set => this.Set((int)WixCustomTableTupleFields.ColumnNames, value); | ||
| 80 | } | ||
| 81 | |||
| 82 | public string ColumnTypes | ||
| 83 | { | ||
| 84 | get => (string)this.Fields[(int)WixCustomTableTupleFields.ColumnTypes]?.Value; | ||
| 85 | set => this.Set((int)WixCustomTableTupleFields.ColumnTypes, value); | ||
| 86 | } | ||
| 87 | |||
| 88 | public string PrimaryKeys | ||
| 89 | { | ||
| 90 | get => (string)this.Fields[(int)WixCustomTableTupleFields.PrimaryKeys]?.Value; | ||
| 91 | set => this.Set((int)WixCustomTableTupleFields.PrimaryKeys, value); | ||
| 92 | } | ||
| 93 | |||
| 94 | public string MinValues | ||
| 95 | { | ||
| 96 | get => (string)this.Fields[(int)WixCustomTableTupleFields.MinValues]?.Value; | ||
| 97 | set => this.Set((int)WixCustomTableTupleFields.MinValues, value); | ||
| 98 | } | ||
| 99 | |||
| 100 | public string MaxValues | ||
| 101 | { | ||
| 102 | get => (string)this.Fields[(int)WixCustomTableTupleFields.MaxValues]?.Value; | ||
| 103 | set => this.Set((int)WixCustomTableTupleFields.MaxValues, value); | ||
| 104 | } | ||
| 105 | |||
| 106 | public string KeyTables | ||
| 107 | { | ||
| 108 | get => (string)this.Fields[(int)WixCustomTableTupleFields.KeyTables]?.Value; | ||
| 109 | set => this.Set((int)WixCustomTableTupleFields.KeyTables, value); | ||
| 110 | } | ||
| 111 | |||
| 112 | public string KeyColumns | ||
| 113 | { | ||
| 114 | get => (string)this.Fields[(int)WixCustomTableTupleFields.KeyColumns]?.Value; | ||
| 115 | set => this.Set((int)WixCustomTableTupleFields.KeyColumns, value); | ||
| 116 | } | ||
| 117 | |||
| 118 | public string Categories | ||
| 119 | { | ||
| 120 | get => (string)this.Fields[(int)WixCustomTableTupleFields.Categories]?.Value; | ||
| 121 | set => this.Set((int)WixCustomTableTupleFields.Categories, value); | ||
| 122 | } | ||
| 123 | |||
| 124 | public string Sets | ||
| 125 | { | ||
| 126 | get => (string)this.Fields[(int)WixCustomTableTupleFields.Sets]?.Value; | ||
| 127 | set => this.Set((int)WixCustomTableTupleFields.Sets, value); | ||
| 128 | } | ||
| 129 | |||
| 130 | public string Descriptions | ||
| 131 | { | ||
| 132 | get => (string)this.Fields[(int)WixCustomTableTupleFields.Descriptions]?.Value; | ||
| 133 | set => this.Set((int)WixCustomTableTupleFields.Descriptions, value); | ||
| 134 | } | ||
| 135 | |||
| 136 | public string Modularizations | ||
| 137 | { | ||
| 138 | get => (string)this.Fields[(int)WixCustomTableTupleFields.Modularizations]?.Value; | ||
| 139 | set => this.Set((int)WixCustomTableTupleFields.Modularizations, value); | ||
| 140 | } | ||
| 141 | |||
| 142 | public int BootstrapperApplicationData | ||
| 143 | { | ||
| 144 | get => (int)this.Fields[(int)WixCustomTableTupleFields.BootstrapperApplicationData]?.Value; | ||
| 145 | set => this.Set((int)WixCustomTableTupleFields.BootstrapperApplicationData, value); | ||
| 146 | } | ||
| 147 | } | ||
| 148 | } \ No newline at end of file | ||
