diff options
author | Rob Mensching <rob@firegiant.com> | 2021-05-03 09:55:22 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2021-05-03 09:55:22 -0700 |
commit | ff659159e041bf6c083e6b7fcb9b726065a9dd73 (patch) | |
tree | ea95bf3d3e031edcee65de33b9e6954178be669c /src/ext/Util/wixext/Symbols/XmlConfigSymbol.cs | |
parent | 8a8a25695351ee542f08886a9d0957c78c6af366 (diff) | |
download | wix-ff659159e041bf6c083e6b7fcb9b726065a9dd73.tar.gz wix-ff659159e041bf6c083e6b7fcb9b726065a9dd73.tar.bz2 wix-ff659159e041bf6c083e6b7fcb9b726065a9dd73.zip |
Move Util.wixext into ext
Diffstat (limited to 'src/ext/Util/wixext/Symbols/XmlConfigSymbol.cs')
-rw-r--r-- | src/ext/Util/wixext/Symbols/XmlConfigSymbol.cs | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/src/ext/Util/wixext/Symbols/XmlConfigSymbol.cs b/src/ext/Util/wixext/Symbols/XmlConfigSymbol.cs new file mode 100644 index 00000000..6503a586 --- /dev/null +++ b/src/ext/Util/wixext/Symbols/XmlConfigSymbol.cs | |||
@@ -0,0 +1,111 @@ | |||
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.Symbols; | ||
7 | |||
8 | public static partial class UtilSymbolDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateSymbolDefinition XmlConfig = new IntermediateSymbolDefinition( | ||
11 | UtilSymbolDefinitionType.XmlConfig.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(XmlConfigSymbolFields.File), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(XmlConfigSymbolFields.ElementId), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(XmlConfigSymbolFields.ElementPath), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(XmlConfigSymbolFields.VerifyPath), IntermediateFieldType.String), | ||
18 | new IntermediateFieldDefinition(nameof(XmlConfigSymbolFields.Name), IntermediateFieldType.String), | ||
19 | new IntermediateFieldDefinition(nameof(XmlConfigSymbolFields.Value), IntermediateFieldType.String), | ||
20 | new IntermediateFieldDefinition(nameof(XmlConfigSymbolFields.Flags), IntermediateFieldType.Number), | ||
21 | new IntermediateFieldDefinition(nameof(XmlConfigSymbolFields.ComponentRef), IntermediateFieldType.String), | ||
22 | new IntermediateFieldDefinition(nameof(XmlConfigSymbolFields.Sequence), IntermediateFieldType.Number), | ||
23 | }, | ||
24 | typeof(XmlConfigSymbol)); | ||
25 | } | ||
26 | } | ||
27 | |||
28 | namespace WixToolset.Util.Symbols | ||
29 | { | ||
30 | using WixToolset.Data; | ||
31 | |||
32 | public enum XmlConfigSymbolFields | ||
33 | { | ||
34 | File, | ||
35 | ElementId, | ||
36 | ElementPath, | ||
37 | VerifyPath, | ||
38 | Name, | ||
39 | Value, | ||
40 | Flags, | ||
41 | ComponentRef, | ||
42 | Sequence, | ||
43 | } | ||
44 | |||
45 | public class XmlConfigSymbol : IntermediateSymbol | ||
46 | { | ||
47 | public XmlConfigSymbol() : base(UtilSymbolDefinitions.XmlConfig, null, null) | ||
48 | { | ||
49 | } | ||
50 | |||
51 | public XmlConfigSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilSymbolDefinitions.XmlConfig, sourceLineNumber, id) | ||
52 | { | ||
53 | } | ||
54 | |||
55 | public IntermediateField this[XmlConfigSymbolFields index] => this.Fields[(int)index]; | ||
56 | |||
57 | public string File | ||
58 | { | ||
59 | get => this.Fields[(int)XmlConfigSymbolFields.File].AsString(); | ||
60 | set => this.Set((int)XmlConfigSymbolFields.File, value); | ||
61 | } | ||
62 | |||
63 | public string ElementId | ||
64 | { | ||
65 | get => this.Fields[(int)XmlConfigSymbolFields.ElementId].AsString(); | ||
66 | set => this.Set((int)XmlConfigSymbolFields.ElementId, value); | ||
67 | } | ||
68 | |||
69 | public string ElementPath | ||
70 | { | ||
71 | get => this.Fields[(int)XmlConfigSymbolFields.ElementPath].AsString(); | ||
72 | set => this.Set((int)XmlConfigSymbolFields.ElementPath, value); | ||
73 | } | ||
74 | |||
75 | public string VerifyPath | ||
76 | { | ||
77 | get => this.Fields[(int)XmlConfigSymbolFields.VerifyPath].AsString(); | ||
78 | set => this.Set((int)XmlConfigSymbolFields.VerifyPath, value); | ||
79 | } | ||
80 | |||
81 | public string Name | ||
82 | { | ||
83 | get => this.Fields[(int)XmlConfigSymbolFields.Name].AsString(); | ||
84 | set => this.Set((int)XmlConfigSymbolFields.Name, value); | ||
85 | } | ||
86 | |||
87 | public string Value | ||
88 | { | ||
89 | get => this.Fields[(int)XmlConfigSymbolFields.Value].AsString(); | ||
90 | set => this.Set((int)XmlConfigSymbolFields.Value, value); | ||
91 | } | ||
92 | |||
93 | public int Flags | ||
94 | { | ||
95 | get => this.Fields[(int)XmlConfigSymbolFields.Flags].AsNumber(); | ||
96 | set => this.Set((int)XmlConfigSymbolFields.Flags, value); | ||
97 | } | ||
98 | |||
99 | public string ComponentRef | ||
100 | { | ||
101 | get => this.Fields[(int)XmlConfigSymbolFields.ComponentRef].AsString(); | ||
102 | set => this.Set((int)XmlConfigSymbolFields.ComponentRef, value); | ||
103 | } | ||
104 | |||
105 | public int? Sequence | ||
106 | { | ||
107 | get => this.Fields[(int)XmlConfigSymbolFields.Sequence].AsNullableNumber(); | ||
108 | set => this.Set((int)XmlConfigSymbolFields.Sequence, value); | ||
109 | } | ||
110 | } | ||
111 | } \ No newline at end of file | ||