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