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