aboutsummaryrefslogtreecommitdiff
path: root/src/ext/Util/wixext/Symbols/GroupSymbol.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ext/Util/wixext/Symbols/GroupSymbol.cs')
-rw-r--r--src/ext/Util/wixext/Symbols/GroupSymbol.cs97
1 files changed, 79 insertions, 18 deletions
diff --git a/src/ext/Util/wixext/Symbols/GroupSymbol.cs b/src/ext/Util/wixext/Symbols/GroupSymbol.cs
index b378db44..ef1dc33f 100644
--- a/src/ext/Util/wixext/Symbols/GroupSymbol.cs
+++ b/src/ext/Util/wixext/Symbols/GroupSymbol.cs
@@ -11,27 +11,38 @@ namespace WixToolset.Util
11 UtilSymbolDefinitionType.Group.ToString(), 11 UtilSymbolDefinitionType.Group.ToString(),
12 new[] 12 new[]
13 { 13 {
14 new IntermediateFieldDefinition(nameof(GroupSymbolFields.ComponentRef), IntermediateFieldType.String), 14 new IntermediateFieldDefinition(nameof(GroupSymbol.SymbolFields.ComponentRef), IntermediateFieldType.String),
15 new IntermediateFieldDefinition(nameof(GroupSymbolFields.Name), IntermediateFieldType.String), 15 new IntermediateFieldDefinition(nameof(GroupSymbol.SymbolFields.Name), IntermediateFieldType.String),
16 new IntermediateFieldDefinition(nameof(GroupSymbolFields.Domain), IntermediateFieldType.String), 16 new IntermediateFieldDefinition(nameof(GroupSymbol.SymbolFields.Domain), IntermediateFieldType.String),
17 }, 17 },
18 typeof(GroupSymbol)); 18 typeof(GroupSymbol));
19
20 public static readonly IntermediateSymbolDefinition Group6 = new IntermediateSymbolDefinition(
21 UtilSymbolDefinitionType.Group6.ToString(),
22 new[]
23 {
24 new IntermediateFieldDefinition(nameof(Group6Symbol.SymbolFields.GroupRef), IntermediateFieldType.String),
25 new IntermediateFieldDefinition(nameof(Group6Symbol.SymbolFields.Comment), IntermediateFieldType.String),
26 new IntermediateFieldDefinition(nameof(Group6Symbol.SymbolFields.Attributes), IntermediateFieldType.Number),
27 },
28 typeof(Group6Symbol));
19 } 29 }
20} 30}
21 31
22namespace WixToolset.Util.Symbols 32namespace WixToolset.Util.Symbols
23{ 33{
34 using System;
24 using WixToolset.Data; 35 using WixToolset.Data;
25 36
26 public enum GroupSymbolFields
27 {
28 ComponentRef,
29 Name,
30 Domain,
31 }
32
33 public class GroupSymbol : IntermediateSymbol 37 public class GroupSymbol : IntermediateSymbol
34 { 38 {
39 public enum SymbolFields
40 {
41 ComponentRef,
42 Name,
43 Domain,
44 }
45
35 public GroupSymbol() : base(UtilSymbolDefinitions.Group, null, null) 46 public GroupSymbol() : base(UtilSymbolDefinitions.Group, null, null)
36 { 47 {
37 } 48 }
@@ -40,24 +51,74 @@ namespace WixToolset.Util.Symbols
40 { 51 {
41 } 52 }
42 53
43 public IntermediateField this[GroupSymbolFields index] => this.Fields[(int)index]; 54 public IntermediateField this[GroupSymbol.SymbolFields index] => this.Fields[(int)index];
44 55
45 public string ComponentRef 56 public string ComponentRef
46 { 57 {
47 get => this.Fields[(int)GroupSymbolFields.ComponentRef].AsString(); 58 get => this.Fields[(int)GroupSymbol.SymbolFields.ComponentRef].AsString();
48 set => this.Set((int)GroupSymbolFields.ComponentRef, value); 59 set => this.Set((int)GroupSymbol.SymbolFields.ComponentRef, value);
49 } 60 }
50 61
51 public string Name 62 public string Name
52 { 63 {
53 get => this.Fields[(int)GroupSymbolFields.Name].AsString(); 64 get => this.Fields[(int)GroupSymbol.SymbolFields.Name].AsString();
54 set => this.Set((int)GroupSymbolFields.Name, value); 65 set => this.Set((int)GroupSymbol.SymbolFields.Name, value);
55 } 66 }
56 67
57 public string Domain 68 public string Domain
58 { 69 {
59 get => this.Fields[(int)GroupSymbolFields.Domain].AsString(); 70 get => this.Fields[(int)GroupSymbol.SymbolFields.Domain].AsString();
60 set => this.Set((int)GroupSymbolFields.Domain, value); 71 set => this.Set((int)GroupSymbol.SymbolFields.Domain, value);
61 } 72 }
62 } 73 }
63} \ No newline at end of file 74
75 public class Group6Symbol : IntermediateSymbol
76 {
77 [Flags]
78 public enum SymbolAttributes
79 {
80 None = 0x00000000,
81 FailIfExists = 0x00000001,
82 UpdateIfExists = 0x00000002,
83 DontRemoveOnUninstall = 0x00000004,
84 DontCreateGroup = 0x00000008,
85 NonVital = 0x00000010,
86 RemoveComment = 0x00000020,
87 }
88
89 public enum SymbolFields
90 {
91 GroupRef,
92 Comment,
93 Attributes,
94 }
95
96 public Group6Symbol() : base(UtilSymbolDefinitions.Group6, null, null)
97 {
98 }
99
100 public Group6Symbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilSymbolDefinitions.Group6, sourceLineNumber, id)
101 {
102 }
103
104 public IntermediateField this[Group6Symbol.SymbolFields index] => this.Fields[(int)index];
105
106 public string GroupRef
107 {
108 get => this.Fields[(int)Group6Symbol.SymbolFields.GroupRef].AsString();
109 set => this.Set((int)Group6Symbol.SymbolFields.GroupRef, value);
110 }
111
112 public string Comment
113 {
114 get => this.Fields[(int)Group6Symbol.SymbolFields.Comment].AsString();
115 set => this.Set((int)Group6Symbol.SymbolFields.Comment, value);
116 }
117
118 public SymbolAttributes Attributes
119 {
120 get => (SymbolAttributes)this.Fields[(int)Group6Symbol.SymbolFields.Attributes].AsNumber();
121 set => this.Set((int)Group6Symbol.SymbolFields.Attributes, (int)value);
122 }
123 }
124}