diff options
Diffstat (limited to 'src/WixToolset.Data/Tuples/WixBundleVariableTuple.cs')
-rw-r--r-- | src/WixToolset.Data/Tuples/WixBundleVariableTuple.cs | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Tuples/WixBundleVariableTuple.cs b/src/WixToolset.Data/Tuples/WixBundleVariableTuple.cs new file mode 100644 index 00000000..c5724e6c --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundleVariableTuple.cs | |||
@@ -0,0 +1,76 @@ | |||
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 WixBundleVariable = new IntermediateTupleDefinition( | ||
10 | TupleDefinitionType.WixBundleVariable, | ||
11 | new[] | ||
12 | { | ||
13 | new IntermediateFieldDefinition(nameof(WixBundleVariableTupleFields.WixBundleVariable), IntermediateFieldType.String), | ||
14 | new IntermediateFieldDefinition(nameof(WixBundleVariableTupleFields.Value), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixBundleVariableTupleFields.Type), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(WixBundleVariableTupleFields.Hidden), IntermediateFieldType.Bool), | ||
17 | new IntermediateFieldDefinition(nameof(WixBundleVariableTupleFields.Persisted), IntermediateFieldType.Bool), | ||
18 | }, | ||
19 | typeof(WixBundleVariableTuple)); | ||
20 | } | ||
21 | } | ||
22 | |||
23 | namespace WixToolset.Data.Tuples | ||
24 | { | ||
25 | public enum WixBundleVariableTupleFields | ||
26 | { | ||
27 | WixBundleVariable, | ||
28 | Value, | ||
29 | Type, | ||
30 | Hidden, | ||
31 | Persisted, | ||
32 | } | ||
33 | |||
34 | public class WixBundleVariableTuple : IntermediateTuple | ||
35 | { | ||
36 | public WixBundleVariableTuple() : base(TupleDefinitions.WixBundleVariable, null, null) | ||
37 | { | ||
38 | } | ||
39 | |||
40 | public WixBundleVariableTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundleVariable, sourceLineNumber, id) | ||
41 | { | ||
42 | } | ||
43 | |||
44 | public IntermediateField this[WixBundleVariableTupleFields index] => this.Fields[(int)index]; | ||
45 | |||
46 | public string WixBundleVariable | ||
47 | { | ||
48 | get => (string)this.Fields[(int)WixBundleVariableTupleFields.WixBundleVariable]?.Value; | ||
49 | set => this.Set((int)WixBundleVariableTupleFields.WixBundleVariable, value); | ||
50 | } | ||
51 | |||
52 | public string Value | ||
53 | { | ||
54 | get => (string)this.Fields[(int)WixBundleVariableTupleFields.Value]?.Value; | ||
55 | set => this.Set((int)WixBundleVariableTupleFields.Value, value); | ||
56 | } | ||
57 | |||
58 | public string Type | ||
59 | { | ||
60 | get => (string)this.Fields[(int)WixBundleVariableTupleFields.Type]?.Value; | ||
61 | set => this.Set((int)WixBundleVariableTupleFields.Type, value); | ||
62 | } | ||
63 | |||
64 | public bool Hidden | ||
65 | { | ||
66 | get => (bool)this.Fields[(int)WixBundleVariableTupleFields.Hidden]?.Value; | ||
67 | set => this.Set((int)WixBundleVariableTupleFields.Hidden, value); | ||
68 | } | ||
69 | |||
70 | public bool Persisted | ||
71 | { | ||
72 | get => (bool)this.Fields[(int)WixBundleVariableTupleFields.Persisted]?.Value; | ||
73 | set => this.Set((int)WixBundleVariableTupleFields.Persisted, value); | ||
74 | } | ||
75 | } | ||
76 | } \ No newline at end of file | ||