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