aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data/Symbols/WixRelatedBundleSymbol.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Data/Symbols/WixRelatedBundleSymbol.cs')
-rw-r--r--src/WixToolset.Data/Symbols/WixRelatedBundleSymbol.cs60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Symbols/WixRelatedBundleSymbol.cs b/src/WixToolset.Data/Symbols/WixRelatedBundleSymbol.cs
new file mode 100644
index 00000000..dc544e29
--- /dev/null
+++ b/src/WixToolset.Data/Symbols/WixRelatedBundleSymbol.cs
@@ -0,0 +1,60 @@
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.Symbols;
6
7 public static partial class SymbolDefinitions
8 {
9 public static readonly IntermediateSymbolDefinition WixRelatedBundle = new IntermediateSymbolDefinition(
10 SymbolDefinitionType.WixRelatedBundle,
11 new[]
12 {
13 new IntermediateFieldDefinition(nameof(WixRelatedBundleSymbolFields.BundleId), IntermediateFieldType.String),
14 new IntermediateFieldDefinition(nameof(WixRelatedBundleSymbolFields.Action), IntermediateFieldType.Number),
15 },
16 typeof(WixRelatedBundleSymbol));
17 }
18}
19
20namespace WixToolset.Data.Symbols
21{
22 public enum WixRelatedBundleSymbolFields
23 {
24 BundleId,
25 Action,
26 }
27
28 public enum RelatedBundleActionType
29 {
30 Detect,
31 Upgrade,
32 Addon,
33 Patch
34 }
35
36 public class WixRelatedBundleSymbol : IntermediateSymbol
37 {
38 public WixRelatedBundleSymbol() : base(SymbolDefinitions.WixRelatedBundle, null, null)
39 {
40 }
41
42 public WixRelatedBundleSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixRelatedBundle, sourceLineNumber, id)
43 {
44 }
45
46 public IntermediateField this[WixRelatedBundleSymbolFields index] => this.Fields[(int)index];
47
48 public string BundleId
49 {
50 get => (string)this.Fields[(int)WixRelatedBundleSymbolFields.BundleId];
51 set => this.Set((int)WixRelatedBundleSymbolFields.BundleId, value);
52 }
53
54 public RelatedBundleActionType Action
55 {
56 get => (RelatedBundleActionType)this.Fields[(int)WixRelatedBundleSymbolFields.Action].AsNumber();
57 set => this.Set((int)WixRelatedBundleSymbolFields.Action, (int)value);
58 }
59 }
60} \ No newline at end of file