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