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