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