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