diff options
Diffstat (limited to '')
-rw-r--r-- | src/WixToolset.Data/Tuples/_ValidationTuple.cs | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Tuples/_ValidationTuple.cs b/src/WixToolset.Data/Tuples/_ValidationTuple.cs new file mode 100644 index 00000000..3bcd064c --- /dev/null +++ b/src/WixToolset.Data/Tuples/_ValidationTuple.cs | |||
@@ -0,0 +1,116 @@ | |||
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 _Validation = new IntermediateTupleDefinition( | ||
10 | TupleDefinitionType._Validation, | ||
11 | new[] | ||
12 | { | ||
13 | new IntermediateFieldDefinition(nameof(_ValidationTupleFields.Table), IntermediateFieldType.String), | ||
14 | new IntermediateFieldDefinition(nameof(_ValidationTupleFields.Column), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(_ValidationTupleFields.Nullable), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(_ValidationTupleFields.MinValue), IntermediateFieldType.Number), | ||
17 | new IntermediateFieldDefinition(nameof(_ValidationTupleFields.MaxValue), IntermediateFieldType.Number), | ||
18 | new IntermediateFieldDefinition(nameof(_ValidationTupleFields.KeyTable), IntermediateFieldType.String), | ||
19 | new IntermediateFieldDefinition(nameof(_ValidationTupleFields.KeyColumn), IntermediateFieldType.Number), | ||
20 | new IntermediateFieldDefinition(nameof(_ValidationTupleFields.Category), IntermediateFieldType.String), | ||
21 | new IntermediateFieldDefinition(nameof(_ValidationTupleFields.Set), IntermediateFieldType.String), | ||
22 | new IntermediateFieldDefinition(nameof(_ValidationTupleFields.Description), IntermediateFieldType.String), | ||
23 | }, | ||
24 | typeof(_ValidationTuple)); | ||
25 | } | ||
26 | } | ||
27 | |||
28 | namespace WixToolset.Data.Tuples | ||
29 | { | ||
30 | public enum _ValidationTupleFields | ||
31 | { | ||
32 | Table, | ||
33 | Column, | ||
34 | Nullable, | ||
35 | MinValue, | ||
36 | MaxValue, | ||
37 | KeyTable, | ||
38 | KeyColumn, | ||
39 | Category, | ||
40 | Set, | ||
41 | Description, | ||
42 | } | ||
43 | |||
44 | public class _ValidationTuple : IntermediateTuple | ||
45 | { | ||
46 | public _ValidationTuple() : base(TupleDefinitions._Validation, null, null) | ||
47 | { | ||
48 | } | ||
49 | |||
50 | public _ValidationTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions._Validation, sourceLineNumber, id) | ||
51 | { | ||
52 | } | ||
53 | |||
54 | public IntermediateField this[_ValidationTupleFields index] => this.Fields[(int)index]; | ||
55 | |||
56 | public string Table | ||
57 | { | ||
58 | get => (string)this.Fields[(int)_ValidationTupleFields.Table]?.Value; | ||
59 | set => this.Set((int)_ValidationTupleFields.Table, value); | ||
60 | } | ||
61 | |||
62 | public string Column | ||
63 | { | ||
64 | get => (string)this.Fields[(int)_ValidationTupleFields.Column]?.Value; | ||
65 | set => this.Set((int)_ValidationTupleFields.Column, value); | ||
66 | } | ||
67 | |||
68 | public string Nullable | ||
69 | { | ||
70 | get => (string)this.Fields[(int)_ValidationTupleFields.Nullable]?.Value; | ||
71 | set => this.Set((int)_ValidationTupleFields.Nullable, value); | ||
72 | } | ||
73 | |||
74 | public int MinValue | ||
75 | { | ||
76 | get => (int)this.Fields[(int)_ValidationTupleFields.MinValue]?.Value; | ||
77 | set => this.Set((int)_ValidationTupleFields.MinValue, value); | ||
78 | } | ||
79 | |||
80 | public int MaxValue | ||
81 | { | ||
82 | get => (int)this.Fields[(int)_ValidationTupleFields.MaxValue]?.Value; | ||
83 | set => this.Set((int)_ValidationTupleFields.MaxValue, value); | ||
84 | } | ||
85 | |||
86 | public string KeyTable | ||
87 | { | ||
88 | get => (string)this.Fields[(int)_ValidationTupleFields.KeyTable]?.Value; | ||
89 | set => this.Set((int)_ValidationTupleFields.KeyTable, value); | ||
90 | } | ||
91 | |||
92 | public int KeyColumn | ||
93 | { | ||
94 | get => (int)this.Fields[(int)_ValidationTupleFields.KeyColumn]?.Value; | ||
95 | set => this.Set((int)_ValidationTupleFields.KeyColumn, value); | ||
96 | } | ||
97 | |||
98 | public string Category | ||
99 | { | ||
100 | get => (string)this.Fields[(int)_ValidationTupleFields.Category]?.Value; | ||
101 | set => this.Set((int)_ValidationTupleFields.Category, value); | ||
102 | } | ||
103 | |||
104 | public string Set | ||
105 | { | ||
106 | get => (string)this.Fields[(int)_ValidationTupleFields.Set]?.Value; | ||
107 | set => this.Set((int)_ValidationTupleFields.Set, value); | ||
108 | } | ||
109 | |||
110 | public string Description | ||
111 | { | ||
112 | get => (string)this.Fields[(int)_ValidationTupleFields.Description]?.Value; | ||
113 | set => this.Set((int)_ValidationTupleFields.Description, value); | ||
114 | } | ||
115 | } | ||
116 | } \ No newline at end of file | ||