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