diff options
Diffstat (limited to 'src/WixToolset.Data/Symbols/ExtensionSymbol.cs')
-rw-r--r-- | src/WixToolset.Data/Symbols/ExtensionSymbol.cs | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Symbols/ExtensionSymbol.cs b/src/WixToolset.Data/Symbols/ExtensionSymbol.cs new file mode 100644 index 00000000..b8806971 --- /dev/null +++ b/src/WixToolset.Data/Symbols/ExtensionSymbol.cs | |||
@@ -0,0 +1,76 @@ | |||
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.Data | ||
4 | { | ||
5 | using WixToolset.Data.Symbols; | ||
6 | |||
7 | public static partial class SymbolDefinitions | ||
8 | { | ||
9 | public static readonly IntermediateSymbolDefinition Extension = new IntermediateSymbolDefinition( | ||
10 | SymbolDefinitionType.Extension, | ||
11 | new[] | ||
12 | { | ||
13 | new IntermediateFieldDefinition(nameof(ExtensionSymbolFields.Extension), IntermediateFieldType.String), | ||
14 | new IntermediateFieldDefinition(nameof(ExtensionSymbolFields.ComponentRef), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(ExtensionSymbolFields.ProgIdRef), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(ExtensionSymbolFields.MimeRef), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(ExtensionSymbolFields.FeatureRef), IntermediateFieldType.String), | ||
18 | }, | ||
19 | typeof(ExtensionSymbol)); | ||
20 | } | ||
21 | } | ||
22 | |||
23 | namespace WixToolset.Data.Symbols | ||
24 | { | ||
25 | public enum ExtensionSymbolFields | ||
26 | { | ||
27 | Extension, | ||
28 | ComponentRef, | ||
29 | ProgIdRef, | ||
30 | MimeRef, | ||
31 | FeatureRef, | ||
32 | } | ||
33 | |||
34 | public class ExtensionSymbol : IntermediateSymbol | ||
35 | { | ||
36 | public ExtensionSymbol() : base(SymbolDefinitions.Extension, null, null) | ||
37 | { | ||
38 | } | ||
39 | |||
40 | public ExtensionSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.Extension, sourceLineNumber, id) | ||
41 | { | ||
42 | } | ||
43 | |||
44 | public IntermediateField this[ExtensionSymbolFields index] => this.Fields[(int)index]; | ||
45 | |||
46 | public string Extension | ||
47 | { | ||
48 | get => (string)this.Fields[(int)ExtensionSymbolFields.Extension]; | ||
49 | set => this.Set((int)ExtensionSymbolFields.Extension, value); | ||
50 | } | ||
51 | |||
52 | public string ComponentRef | ||
53 | { | ||
54 | get => (string)this.Fields[(int)ExtensionSymbolFields.ComponentRef]; | ||
55 | set => this.Set((int)ExtensionSymbolFields.ComponentRef, value); | ||
56 | } | ||
57 | |||
58 | public string ProgIdRef | ||
59 | { | ||
60 | get => (string)this.Fields[(int)ExtensionSymbolFields.ProgIdRef]; | ||
61 | set => this.Set((int)ExtensionSymbolFields.ProgIdRef, value); | ||
62 | } | ||
63 | |||
64 | public string MimeRef | ||
65 | { | ||
66 | get => (string)this.Fields[(int)ExtensionSymbolFields.MimeRef]; | ||
67 | set => this.Set((int)ExtensionSymbolFields.MimeRef, value); | ||
68 | } | ||
69 | |||
70 | public string FeatureRef | ||
71 | { | ||
72 | get => (string)this.Fields[(int)ExtensionSymbolFields.FeatureRef]; | ||
73 | set => this.Set((int)ExtensionSymbolFields.FeatureRef, value); | ||
74 | } | ||
75 | } | ||
76 | } \ No newline at end of file | ||