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