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