diff options
Diffstat (limited to 'src/api/wix/WixToolset.Data/Symbols/WixPatchSymbol.cs')
-rw-r--r-- | src/api/wix/WixToolset.Data/Symbols/WixPatchSymbol.cs | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixPatchSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixPatchSymbol.cs new file mode 100644 index 00000000..3f1f20bb --- /dev/null +++ b/src/api/wix/WixToolset.Data/Symbols/WixPatchSymbol.cs | |||
@@ -0,0 +1,98 @@ | |||
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.Symbols; | ||
6 | |||
7 | public static partial class SymbolDefinitions | ||
8 | { | ||
9 | public static readonly IntermediateSymbolDefinition WixPatchId = new IntermediateSymbolDefinition( | ||
10 | SymbolDefinitionType.WixPatch, | ||
11 | new[] | ||
12 | { | ||
13 | new IntermediateFieldDefinition(nameof(WixPatchSymbolFields.ClientPatchId), IntermediateFieldType.String), | ||
14 | new IntermediateFieldDefinition(nameof(WixPatchSymbolFields.OptimizePatchSizeForLargeFiles), IntermediateFieldType.Bool), | ||
15 | new IntermediateFieldDefinition(nameof(WixPatchSymbolFields.ApiPatchingSymbolFlags), IntermediateFieldType.Number), | ||
16 | new IntermediateFieldDefinition(nameof(WixPatchSymbolFields.Codepage), IntermediateFieldType.String), | ||
17 | }, | ||
18 | typeof(WixPatchSymbol)); | ||
19 | } | ||
20 | } | ||
21 | |||
22 | namespace WixToolset.Data.Symbols | ||
23 | { | ||
24 | using System; | ||
25 | |||
26 | public enum WixPatchSymbolFields | ||
27 | { | ||
28 | ClientPatchId, | ||
29 | OptimizePatchSizeForLargeFiles, | ||
30 | ApiPatchingSymbolFlags, | ||
31 | Codepage, | ||
32 | } | ||
33 | |||
34 | /// <summary> | ||
35 | /// The following flags are used with PATCH_OPTION_DATA SymbolOptionFlags: | ||
36 | /// </summary> | ||
37 | [Flags] | ||
38 | [CLSCompliant(false)] | ||
39 | public enum PatchSymbolFlags : uint | ||
40 | { | ||
41 | /// <summary> | ||
42 | /// Don't use imagehlp.dll | ||
43 | /// </summary> | ||
44 | PatchSymbolNoImagehlp = 0x00000001, | ||
45 | |||
46 | /// <summary> | ||
47 | /// Don't fail patch due to imagehlp failures. | ||
48 | /// </summary> | ||
49 | PatchSymbolNoFailures = 0x00000002, | ||
50 | |||
51 | /// <summary> | ||
52 | /// After matching decorated symbols, try to match remaining by undecorated names. | ||
53 | /// </summary> | ||
54 | PatchSymbolUndecoratedToo = 0x00000004, | ||
55 | |||
56 | /// <summary> | ||
57 | /// (used internally) | ||
58 | /// </summary> | ||
59 | PatchSymbolReserved = 0x80000000, | ||
60 | } | ||
61 | |||
62 | public class WixPatchSymbol : IntermediateSymbol | ||
63 | { | ||
64 | public WixPatchSymbol() : base(SymbolDefinitions.WixPatchId, null, null) | ||
65 | { | ||
66 | } | ||
67 | |||
68 | public WixPatchSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixPatchId, sourceLineNumber, id) | ||
69 | { | ||
70 | } | ||
71 | |||
72 | public IntermediateField this[WixPatchSymbolFields index] => this.Fields[(int)index]; | ||
73 | |||
74 | public string ClientPatchId | ||
75 | { | ||
76 | get => (string)this.Fields[(int)WixPatchSymbolFields.ClientPatchId]; | ||
77 | set => this.Set((int)WixPatchSymbolFields.ClientPatchId, value); | ||
78 | } | ||
79 | |||
80 | public bool? OptimizePatchSizeForLargeFiles | ||
81 | { | ||
82 | get => (bool?)this.Fields[(int)WixPatchSymbolFields.OptimizePatchSizeForLargeFiles]; | ||
83 | set => this.Set((int)WixPatchSymbolFields.OptimizePatchSizeForLargeFiles, value); | ||
84 | } | ||
85 | |||
86 | public int? ApiPatchingSymbolFlags | ||
87 | { | ||
88 | get => (int?)this.Fields[(int)WixPatchSymbolFields.ApiPatchingSymbolFlags]; | ||
89 | set => this.Set((int)WixPatchSymbolFields.ApiPatchingSymbolFlags, value); | ||
90 | } | ||
91 | |||
92 | public string Codepage | ||
93 | { | ||
94 | get => (string)this.Fields[(int)WixPatchSymbolFields.Codepage]; | ||
95 | set => this.Set((int)WixPatchSymbolFields.Codepage, value); | ||
96 | } | ||
97 | } | ||
98 | } \ No newline at end of file | ||