diff options
Diffstat (limited to 'src/ext/Util/wixext/Symbols/WixTouchFileSymbol.cs')
-rw-r--r-- | src/ext/Util/wixext/Symbols/WixTouchFileSymbol.cs | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/src/ext/Util/wixext/Symbols/WixTouchFileSymbol.cs b/src/ext/Util/wixext/Symbols/WixTouchFileSymbol.cs new file mode 100644 index 00000000..447c21ba --- /dev/null +++ b/src/ext/Util/wixext/Symbols/WixTouchFileSymbol.cs | |||
@@ -0,0 +1,63 @@ | |||
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 WixTouchFile = new IntermediateSymbolDefinition( | ||
11 | UtilSymbolDefinitionType.WixTouchFile.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixTouchFileSymbolFields.ComponentRef), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixTouchFileSymbolFields.Path), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(WixTouchFileSymbolFields.Attributes), IntermediateFieldType.Number), | ||
17 | }, | ||
18 | typeof(WixTouchFileSymbol)); | ||
19 | } | ||
20 | } | ||
21 | |||
22 | namespace WixToolset.Util.Symbols | ||
23 | { | ||
24 | using WixToolset.Data; | ||
25 | |||
26 | public enum WixTouchFileSymbolFields | ||
27 | { | ||
28 | ComponentRef, | ||
29 | Path, | ||
30 | Attributes, | ||
31 | } | ||
32 | |||
33 | public class WixTouchFileSymbol : IntermediateSymbol | ||
34 | { | ||
35 | public WixTouchFileSymbol() : base(UtilSymbolDefinitions.WixTouchFile, null, null) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | public WixTouchFileSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilSymbolDefinitions.WixTouchFile, sourceLineNumber, id) | ||
40 | { | ||
41 | } | ||
42 | |||
43 | public IntermediateField this[WixTouchFileSymbolFields index] => this.Fields[(int)index]; | ||
44 | |||
45 | public string ComponentRef | ||
46 | { | ||
47 | get => this.Fields[(int)WixTouchFileSymbolFields.ComponentRef].AsString(); | ||
48 | set => this.Set((int)WixTouchFileSymbolFields.ComponentRef, value); | ||
49 | } | ||
50 | |||
51 | public string Path | ||
52 | { | ||
53 | get => this.Fields[(int)WixTouchFileSymbolFields.Path].AsString(); | ||
54 | set => this.Set((int)WixTouchFileSymbolFields.Path, value); | ||
55 | } | ||
56 | |||
57 | public int Attributes | ||
58 | { | ||
59 | get => this.Fields[(int)WixTouchFileSymbolFields.Attributes].AsNumber(); | ||
60 | set => this.Set((int)WixTouchFileSymbolFields.Attributes, value); | ||
61 | } | ||
62 | } | ||
63 | } \ No newline at end of file | ||