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