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