diff options
Diffstat (limited to 'src/api/wix/WixToolset.Data/Symbols/WixModuleSymbol.cs')
-rw-r--r-- | src/api/wix/WixToolset.Data/Symbols/WixModuleSymbol.cs | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixModuleSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixModuleSymbol.cs new file mode 100644 index 00000000..fbb16764 --- /dev/null +++ b/src/api/wix/WixToolset.Data/Symbols/WixModuleSymbol.cs | |||
@@ -0,0 +1,68 @@ | |||
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 WixModule = new IntermediateSymbolDefinition( | ||
10 | SymbolDefinitionType.WixModule, | ||
11 | new[] | ||
12 | { | ||
13 | new IntermediateFieldDefinition(nameof(WixModuleSymbolFields.ModuleId), IntermediateFieldType.String), | ||
14 | new IntermediateFieldDefinition(nameof(WixModuleSymbolFields.Language), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixModuleSymbolFields.Version), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(WixModuleSymbolFields.Codepage), IntermediateFieldType.String), | ||
17 | }, | ||
18 | typeof(WixModuleSymbol)); | ||
19 | } | ||
20 | } | ||
21 | |||
22 | namespace WixToolset.Data.Symbols | ||
23 | { | ||
24 | public enum WixModuleSymbolFields | ||
25 | { | ||
26 | ModuleId, | ||
27 | Language, | ||
28 | Version, | ||
29 | Codepage, | ||
30 | } | ||
31 | |||
32 | public class WixModuleSymbol : IntermediateSymbol | ||
33 | { | ||
34 | public WixModuleSymbol() : base(SymbolDefinitions.WixModule, null, null) | ||
35 | { | ||
36 | } | ||
37 | |||
38 | public WixModuleSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixModule, sourceLineNumber, id) | ||
39 | { | ||
40 | } | ||
41 | |||
42 | public IntermediateField this[WixModuleSymbolFields index] => this.Fields[(int)index]; | ||
43 | |||
44 | public string ModuleId | ||
45 | { | ||
46 | get => (string)this.Fields[(int)WixModuleSymbolFields.ModuleId]; | ||
47 | set => this.Set((int)WixModuleSymbolFields.ModuleId, value); | ||
48 | } | ||
49 | |||
50 | public string Language | ||
51 | { | ||
52 | get => (string)this.Fields[(int)WixModuleSymbolFields.Language]; | ||
53 | set => this.Set((int)WixModuleSymbolFields.Language, value); | ||
54 | } | ||
55 | |||
56 | public string Version | ||
57 | { | ||
58 | get => (string)this.Fields[(int)WixModuleSymbolFields.Version]; | ||
59 | set => this.Set((int)WixModuleSymbolFields.Version, value); | ||
60 | } | ||
61 | |||
62 | public string Codepage | ||
63 | { | ||
64 | get => (string)this.Fields[(int)WixModuleSymbolFields.Codepage]; | ||
65 | set => this.Set((int)WixModuleSymbolFields.Codepage, value); | ||
66 | } | ||
67 | } | ||
68 | } | ||