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.cs37
1 files changed, 22 insertions, 15 deletions
diff --git a/src/WixToolset.Data/Tuples/RegLocatorTuple.cs b/src/WixToolset.Data/Tuples/RegLocatorTuple.cs
index f8edad95..8f358051 100644
--- a/src/WixToolset.Data/Tuples/RegLocatorTuple.cs
+++ b/src/WixToolset.Data/Tuples/RegLocatorTuple.cs
@@ -10,11 +10,11 @@ namespace WixToolset.Data
10 TupleDefinitionType.RegLocator, 10 TupleDefinitionType.RegLocator,
11 new[] 11 new[]
12 { 12 {
13 new IntermediateFieldDefinition(nameof(RegLocatorTupleFields.Signature_), IntermediateFieldType.String),
14 new IntermediateFieldDefinition(nameof(RegLocatorTupleFields.Root), IntermediateFieldType.Number), 13 new IntermediateFieldDefinition(nameof(RegLocatorTupleFields.Root), IntermediateFieldType.Number),
15 new IntermediateFieldDefinition(nameof(RegLocatorTupleFields.Key), IntermediateFieldType.String), 14 new IntermediateFieldDefinition(nameof(RegLocatorTupleFields.Key), IntermediateFieldType.String),
16 new IntermediateFieldDefinition(nameof(RegLocatorTupleFields.Name), IntermediateFieldType.String), 15 new IntermediateFieldDefinition(nameof(RegLocatorTupleFields.Name), IntermediateFieldType.String),
17 new IntermediateFieldDefinition(nameof(RegLocatorTupleFields.Type), IntermediateFieldType.Number), 16 new IntermediateFieldDefinition(nameof(RegLocatorTupleFields.Type), IntermediateFieldType.Number),
17 new IntermediateFieldDefinition(nameof(RegLocatorTupleFields.Win64), IntermediateFieldType.Bool),
18 }, 18 },
19 typeof(RegLocatorTuple)); 19 typeof(RegLocatorTuple));
20 } 20 }
@@ -24,13 +24,20 @@ namespace WixToolset.Data.Tuples
24{ 24{
25 public enum RegLocatorTupleFields 25 public enum RegLocatorTupleFields
26 { 26 {
27 Signature_,
28 Root, 27 Root,
29 Key, 28 Key,
30 Name, 29 Name,
31 Type, 30 Type,
31 Win64,
32 } 32 }
33 33
34 public enum RegLocatorType
35 {
36 Directory,
37 FileName,
38 Raw
39 };
40
34 public class RegLocatorTuple : IntermediateTuple 41 public class RegLocatorTuple : IntermediateTuple
35 { 42 {
36 public RegLocatorTuple() : base(TupleDefinitions.RegLocator, null, null) 43 public RegLocatorTuple() : base(TupleDefinitions.RegLocator, null, null)
@@ -43,16 +50,10 @@ namespace WixToolset.Data.Tuples
43 50
44 public IntermediateField this[RegLocatorTupleFields index] => this.Fields[(int)index]; 51 public IntermediateField this[RegLocatorTupleFields index] => this.Fields[(int)index];
45 52
46 public string Signature_ 53 public RegistryRootType Root
47 {
48 get => (string)this.Fields[(int)RegLocatorTupleFields.Signature_];
49 set => this.Set((int)RegLocatorTupleFields.Signature_, value);
50 }
51
52 public int Root
53 { 54 {
54 get => (int)this.Fields[(int)RegLocatorTupleFields.Root]; 55 get => (RegistryRootType)this.Fields[(int)RegLocatorTupleFields.Root].AsNumber();
55 set => this.Set((int)RegLocatorTupleFields.Root, value); 56 set => this.Set((int)RegLocatorTupleFields.Root, (int)value);
56 } 57 }
57 58
58 public string Key 59 public string Key
@@ -67,10 +68,16 @@ namespace WixToolset.Data.Tuples
67 set => this.Set((int)RegLocatorTupleFields.Name, value); 68 set => this.Set((int)RegLocatorTupleFields.Name, value);
68 } 69 }
69 70
70 public int Type 71 public RegLocatorType Type
71 { 72 {
72 get => (int)this.Fields[(int)RegLocatorTupleFields.Type]; 73 get => (RegLocatorType)this.Fields[(int)RegLocatorTupleFields.Type].AsNumber();
73 set => this.Set((int)RegLocatorTupleFields.Type, value); 74 set => this.Set((int)RegLocatorTupleFields.Type, (int)value);
75 }
76
77 public bool Win64
78 {
79 get => this.Fields[(int)RegLocatorTupleFields.Win64].AsBool();
80 set => this.Set((int)RegLocatorTupleFields.Win64, value);
74 } 81 }
75 } 82 }
76} \ No newline at end of file 83}