aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data/Symbols/WixGroupSymbol.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Data/Symbols/WixGroupSymbol.cs')
-rw-r--r--src/WixToolset.Data/Symbols/WixGroupSymbol.cs70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Symbols/WixGroupSymbol.cs b/src/WixToolset.Data/Symbols/WixGroupSymbol.cs
new file mode 100644
index 00000000..b9720890
--- /dev/null
+++ b/src/WixToolset.Data/Symbols/WixGroupSymbol.cs
@@ -0,0 +1,70 @@
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 WixGroup = new IntermediateSymbolDefinition(
10 SymbolDefinitionType.WixGroup,
11 new[]
12 {
13 new IntermediateFieldDefinition(nameof(WixGroupSymbolFields.ParentId), IntermediateFieldType.String),
14 new IntermediateFieldDefinition(nameof(WixGroupSymbolFields.ParentType), IntermediateFieldType.String),
15 new IntermediateFieldDefinition(nameof(WixGroupSymbolFields.ChildId), IntermediateFieldType.String),
16 new IntermediateFieldDefinition(nameof(WixGroupSymbolFields.ChildType), IntermediateFieldType.String),
17 },
18 typeof(WixGroupSymbol));
19 }
20}
21
22namespace WixToolset.Data.Symbols
23{
24 using System;
25
26 public enum WixGroupSymbolFields
27 {
28 ParentId,
29 ParentType,
30 ChildId,
31 ChildType,
32 }
33
34 public class WixGroupSymbol : IntermediateSymbol
35 {
36 public WixGroupSymbol() : base(SymbolDefinitions.WixGroup, null, null)
37 {
38 }
39
40 public WixGroupSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixGroup, sourceLineNumber, id)
41 {
42 }
43
44 public IntermediateField this[WixGroupSymbolFields index] => this.Fields[(int)index];
45
46 public string ParentId
47 {
48 get => (string)this.Fields[(int)WixGroupSymbolFields.ParentId];
49 set => this.Set((int)WixGroupSymbolFields.ParentId, value);
50 }
51
52 public ComplexReferenceParentType ParentType
53 {
54 get => (ComplexReferenceParentType)Enum.Parse(typeof(ComplexReferenceParentType), (string)this.Fields[(int)WixGroupSymbolFields.ParentType], true);
55 set => this.Set((int)WixGroupSymbolFields.ParentType, value.ToString());
56 }
57
58 public string ChildId
59 {
60 get => (string)this.Fields[(int)WixGroupSymbolFields.ChildId];
61 set => this.Set((int)WixGroupSymbolFields.ChildId, value);
62 }
63
64 public ComplexReferenceChildType ChildType
65 {
66 get => (ComplexReferenceChildType)Enum.Parse(typeof(ComplexReferenceChildType), (string)this.Fields[(int)WixGroupSymbolFields.ChildType], true);
67 set => this.Set((int)WixGroupSymbolFields.ChildType, value.ToString());
68 }
69 }
70} \ No newline at end of file