diff options
Diffstat (limited to '')
-rw-r--r-- | src/wixext/Tuples/SqlStringTuple.cs | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/src/wixext/Tuples/SqlStringTuple.cs b/src/wixext/Tuples/SqlStringTuple.cs new file mode 100644 index 00000000..d2cba0e0 --- /dev/null +++ b/src/wixext/Tuples/SqlStringTuple.cs | |||
@@ -0,0 +1,95 @@ | |||
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.Sql | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | using WixToolset.Sql.Tuples; | ||
7 | |||
8 | public static partial class SqlTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition SqlString = new IntermediateTupleDefinition( | ||
11 | SqlTupleDefinitionType.SqlString.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(SqlStringTupleFields.String), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(SqlStringTupleFields.SqlDb_), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(SqlStringTupleFields.Component_), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(SqlStringTupleFields.SQL), IntermediateFieldType.String), | ||
18 | new IntermediateFieldDefinition(nameof(SqlStringTupleFields.User_), IntermediateFieldType.String), | ||
19 | new IntermediateFieldDefinition(nameof(SqlStringTupleFields.Attributes), IntermediateFieldType.Number), | ||
20 | new IntermediateFieldDefinition(nameof(SqlStringTupleFields.Sequence), IntermediateFieldType.Number), | ||
21 | }, | ||
22 | typeof(SqlStringTuple)); | ||
23 | } | ||
24 | } | ||
25 | |||
26 | namespace WixToolset.Sql.Tuples | ||
27 | { | ||
28 | using WixToolset.Data; | ||
29 | |||
30 | public enum SqlStringTupleFields | ||
31 | { | ||
32 | String, | ||
33 | SqlDb_, | ||
34 | Component_, | ||
35 | SQL, | ||
36 | User_, | ||
37 | Attributes, | ||
38 | Sequence, | ||
39 | } | ||
40 | |||
41 | public class SqlStringTuple : IntermediateTuple | ||
42 | { | ||
43 | public SqlStringTuple() : base(SqlTupleDefinitions.SqlString, null, null) | ||
44 | { | ||
45 | } | ||
46 | |||
47 | public SqlStringTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SqlTupleDefinitions.SqlString, sourceLineNumber, id) | ||
48 | { | ||
49 | } | ||
50 | |||
51 | public IntermediateField this[SqlStringTupleFields index] => this.Fields[(int)index]; | ||
52 | |||
53 | public string String | ||
54 | { | ||
55 | get => this.Fields[(int)SqlStringTupleFields.String].AsString(); | ||
56 | set => this.Set((int)SqlStringTupleFields.String, value); | ||
57 | } | ||
58 | |||
59 | public string SqlDb_ | ||
60 | { | ||
61 | get => this.Fields[(int)SqlStringTupleFields.SqlDb_].AsString(); | ||
62 | set => this.Set((int)SqlStringTupleFields.SqlDb_, value); | ||
63 | } | ||
64 | |||
65 | public string Component_ | ||
66 | { | ||
67 | get => this.Fields[(int)SqlStringTupleFields.Component_].AsString(); | ||
68 | set => this.Set((int)SqlStringTupleFields.Component_, value); | ||
69 | } | ||
70 | |||
71 | public string SQL | ||
72 | { | ||
73 | get => this.Fields[(int)SqlStringTupleFields.SQL].AsString(); | ||
74 | set => this.Set((int)SqlStringTupleFields.SQL, value); | ||
75 | } | ||
76 | |||
77 | public string User_ | ||
78 | { | ||
79 | get => this.Fields[(int)SqlStringTupleFields.User_].AsString(); | ||
80 | set => this.Set((int)SqlStringTupleFields.User_, value); | ||
81 | } | ||
82 | |||
83 | public int Attributes | ||
84 | { | ||
85 | get => this.Fields[(int)SqlStringTupleFields.Attributes].AsNumber(); | ||
86 | set => this.Set((int)SqlStringTupleFields.Attributes, value); | ||
87 | } | ||
88 | |||
89 | public int Sequence | ||
90 | { | ||
91 | get => this.Fields[(int)SqlStringTupleFields.Sequence].AsNumber(); | ||
92 | set => this.Set((int)SqlStringTupleFields.Sequence, value); | ||
93 | } | ||
94 | } | ||
95 | } \ No newline at end of file | ||