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