diff options
Diffstat (limited to 'src/WixToolset.Data/Symbols/WixBundleMspPackageSymbol.cs')
-rw-r--r-- | src/WixToolset.Data/Symbols/WixBundleMspPackageSymbol.cs | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Symbols/WixBundleMspPackageSymbol.cs b/src/WixToolset.Data/Symbols/WixBundleMspPackageSymbol.cs new file mode 100644 index 00000000..3784c2ff --- /dev/null +++ b/src/WixToolset.Data/Symbols/WixBundleMspPackageSymbol.cs | |||
@@ -0,0 +1,81 @@ | |||
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 WixBundleMspPackage = new IntermediateSymbolDefinition( | ||
10 | SymbolDefinitionType.WixBundleMspPackage, | ||
11 | new[] | ||
12 | { | ||
13 | new IntermediateFieldDefinition(nameof(WixBundleMspPackageSymbolFields.Attributes), IntermediateFieldType.Number), | ||
14 | new IntermediateFieldDefinition(nameof(WixBundleMspPackageSymbolFields.PatchCode), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixBundleMspPackageSymbolFields.Manufacturer), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(WixBundleMspPackageSymbolFields.PatchXml), IntermediateFieldType.String), | ||
17 | }, | ||
18 | typeof(WixBundleMspPackageSymbol)); | ||
19 | } | ||
20 | } | ||
21 | |||
22 | namespace WixToolset.Data.Symbols | ||
23 | { | ||
24 | using System; | ||
25 | |||
26 | public enum WixBundleMspPackageSymbolFields | ||
27 | { | ||
28 | Attributes, | ||
29 | PatchCode, | ||
30 | Manufacturer, | ||
31 | PatchXml, | ||
32 | } | ||
33 | |||
34 | [Flags] | ||
35 | public enum WixBundleMspPackageAttributes | ||
36 | { | ||
37 | Slipstream = 0x2, | ||
38 | TargetUnspecified = 0x4, | ||
39 | } | ||
40 | |||
41 | public class WixBundleMspPackageSymbol : IntermediateSymbol | ||
42 | { | ||
43 | public WixBundleMspPackageSymbol() : base(SymbolDefinitions.WixBundleMspPackage, null, null) | ||
44 | { | ||
45 | } | ||
46 | |||
47 | public WixBundleMspPackageSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixBundleMspPackage, sourceLineNumber, id) | ||
48 | { | ||
49 | } | ||
50 | |||
51 | public IntermediateField this[WixBundleMspPackageSymbolFields index] => this.Fields[(int)index]; | ||
52 | |||
53 | public WixBundleMspPackageAttributes Attributes | ||
54 | { | ||
55 | get => (WixBundleMspPackageAttributes)(int)this.Fields[(int)WixBundleMspPackageSymbolFields.Attributes]; | ||
56 | set => this.Set((int)WixBundleMspPackageSymbolFields.Attributes, (int)value); | ||
57 | } | ||
58 | |||
59 | public string PatchCode | ||
60 | { | ||
61 | get => (string)this.Fields[(int)WixBundleMspPackageSymbolFields.PatchCode]; | ||
62 | set => this.Set((int)WixBundleMspPackageSymbolFields.PatchCode, value); | ||
63 | } | ||
64 | |||
65 | public string Manufacturer | ||
66 | { | ||
67 | get => (string)this.Fields[(int)WixBundleMspPackageSymbolFields.Manufacturer]; | ||
68 | set => this.Set((int)WixBundleMspPackageSymbolFields.Manufacturer, value); | ||
69 | } | ||
70 | |||
71 | public string PatchXml | ||
72 | { | ||
73 | get => (string)this.Fields[(int)WixBundleMspPackageSymbolFields.PatchXml]; | ||
74 | set => this.Set((int)WixBundleMspPackageSymbolFields.PatchXml, value); | ||
75 | } | ||
76 | |||
77 | public bool Slipstream => (this.Attributes & WixBundleMspPackageAttributes.Slipstream) == WixBundleMspPackageAttributes.Slipstream; | ||
78 | |||
79 | public bool TargetUnspecified => (this.Attributes & WixBundleMspPackageAttributes.TargetUnspecified) == WixBundleMspPackageAttributes.TargetUnspecified; | ||
80 | } | ||
81 | } \ No newline at end of file | ||