diff options
Diffstat (limited to 'src/wixext/Tuples/XmlFileTuple.cs')
-rw-r--r-- | src/wixext/Tuples/XmlFileTuple.cs | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/src/wixext/Tuples/XmlFileTuple.cs b/src/wixext/Tuples/XmlFileTuple.cs new file mode 100644 index 00000000..27ea7119 --- /dev/null +++ b/src/wixext/Tuples/XmlFileTuple.cs | |||
@@ -0,0 +1,103 @@ | |||
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.Util | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | using WixToolset.Util.Tuples; | ||
7 | |||
8 | public static partial class UtilTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition XmlFile = new IntermediateTupleDefinition( | ||
11 | UtilTupleDefinitionType.XmlFile.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(XmlFileTupleFields.XmlFile), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(XmlFileTupleFields.File), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(XmlFileTupleFields.ElementPath), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(XmlFileTupleFields.Name), IntermediateFieldType.String), | ||
18 | new IntermediateFieldDefinition(nameof(XmlFileTupleFields.Value), IntermediateFieldType.String), | ||
19 | new IntermediateFieldDefinition(nameof(XmlFileTupleFields.Flags), IntermediateFieldType.Number), | ||
20 | new IntermediateFieldDefinition(nameof(XmlFileTupleFields.Component_), IntermediateFieldType.String), | ||
21 | new IntermediateFieldDefinition(nameof(XmlFileTupleFields.Sequence), IntermediateFieldType.Number), | ||
22 | }, | ||
23 | typeof(XmlFileTuple)); | ||
24 | } | ||
25 | } | ||
26 | |||
27 | namespace WixToolset.Util.Tuples | ||
28 | { | ||
29 | using WixToolset.Data; | ||
30 | |||
31 | public enum XmlFileTupleFields | ||
32 | { | ||
33 | XmlFile, | ||
34 | File, | ||
35 | ElementPath, | ||
36 | Name, | ||
37 | Value, | ||
38 | Flags, | ||
39 | Component_, | ||
40 | Sequence, | ||
41 | } | ||
42 | |||
43 | public class XmlFileTuple : IntermediateTuple | ||
44 | { | ||
45 | public XmlFileTuple() : base(UtilTupleDefinitions.XmlFile, null, null) | ||
46 | { | ||
47 | } | ||
48 | |||
49 | public XmlFileTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilTupleDefinitions.XmlFile, sourceLineNumber, id) | ||
50 | { | ||
51 | } | ||
52 | |||
53 | public IntermediateField this[XmlFileTupleFields index] => this.Fields[(int)index]; | ||
54 | |||
55 | public string XmlFile | ||
56 | { | ||
57 | get => this.Fields[(int)XmlFileTupleFields.XmlFile].AsString(); | ||
58 | set => this.Set((int)XmlFileTupleFields.XmlFile, value); | ||
59 | } | ||
60 | |||
61 | public string File | ||
62 | { | ||
63 | get => this.Fields[(int)XmlFileTupleFields.File].AsString(); | ||
64 | set => this.Set((int)XmlFileTupleFields.File, value); | ||
65 | } | ||
66 | |||
67 | public string ElementPath | ||
68 | { | ||
69 | get => this.Fields[(int)XmlFileTupleFields.ElementPath].AsString(); | ||
70 | set => this.Set((int)XmlFileTupleFields.ElementPath, value); | ||
71 | } | ||
72 | |||
73 | public string Name | ||
74 | { | ||
75 | get => this.Fields[(int)XmlFileTupleFields.Name].AsString(); | ||
76 | set => this.Set((int)XmlFileTupleFields.Name, value); | ||
77 | } | ||
78 | |||
79 | public string Value | ||
80 | { | ||
81 | get => this.Fields[(int)XmlFileTupleFields.Value].AsString(); | ||
82 | set => this.Set((int)XmlFileTupleFields.Value, value); | ||
83 | } | ||
84 | |||
85 | public int Flags | ||
86 | { | ||
87 | get => this.Fields[(int)XmlFileTupleFields.Flags].AsNumber(); | ||
88 | set => this.Set((int)XmlFileTupleFields.Flags, value); | ||
89 | } | ||
90 | |||
91 | public string Component_ | ||
92 | { | ||
93 | get => this.Fields[(int)XmlFileTupleFields.Component_].AsString(); | ||
94 | set => this.Set((int)XmlFileTupleFields.Component_, value); | ||
95 | } | ||
96 | |||
97 | public int Sequence | ||
98 | { | ||
99 | get => this.Fields[(int)XmlFileTupleFields.Sequence].AsNumber(); | ||
100 | set => this.Set((int)XmlFileTupleFields.Sequence, value); | ||
101 | } | ||
102 | } | ||
103 | } \ No newline at end of file | ||