diff options
Diffstat (limited to 'src/ext/Util/wixext/Symbols')
-rw-r--r-- | src/ext/Util/wixext/Symbols/GroupGroupSymbol.cs | 56 | ||||
-rw-r--r-- | src/ext/Util/wixext/Symbols/GroupSymbol.cs | 97 | ||||
-rw-r--r-- | src/ext/Util/wixext/Symbols/UtilSymbolDefinitions.cs | 8 |
3 files changed, 143 insertions, 18 deletions
diff --git a/src/ext/Util/wixext/Symbols/GroupGroupSymbol.cs b/src/ext/Util/wixext/Symbols/GroupGroupSymbol.cs new file mode 100644 index 00000000..fdd1ee76 --- /dev/null +++ b/src/ext/Util/wixext/Symbols/GroupGroupSymbol.cs | |||
@@ -0,0 +1,56 @@ | |||
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.Util | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | using WixToolset.Util.Symbols; | ||
7 | |||
8 | public static partial class UtilSymbolDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateSymbolDefinition GroupGroup = new IntermediateSymbolDefinition( | ||
11 | UtilSymbolDefinitionType.GroupGroup.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(GroupGroupSymbol.SymbolFields.ParentGroupRef), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(GroupGroupSymbol.SymbolFields.ChildGroupRef), IntermediateFieldType.String), | ||
16 | }, | ||
17 | typeof(UserGroupSymbol)); | ||
18 | } | ||
19 | } | ||
20 | |||
21 | namespace WixToolset.Util.Symbols | ||
22 | { | ||
23 | using WixToolset.Data; | ||
24 | |||
25 | public class GroupGroupSymbol : IntermediateSymbol | ||
26 | { | ||
27 | public enum SymbolFields | ||
28 | { | ||
29 | ParentGroupRef, | ||
30 | ChildGroupRef, | ||
31 | } | ||
32 | |||
33 | public GroupGroupSymbol() : base(UtilSymbolDefinitions.GroupGroup, null, null) | ||
34 | { | ||
35 | } | ||
36 | |||
37 | public GroupGroupSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilSymbolDefinitions.GroupGroup, sourceLineNumber, id) | ||
38 | { | ||
39 | } | ||
40 | |||
41 | public IntermediateField this[GroupGroupSymbol.SymbolFields index] => this.Fields[(int)index]; | ||
42 | |||
43 | public string ParentGroupRef | ||
44 | { | ||
45 | get => this.Fields[(int)GroupGroupSymbol.SymbolFields.ParentGroupRef].AsString(); | ||
46 | set => this.Set((int)GroupGroupSymbol.SymbolFields.ParentGroupRef, value); | ||
47 | } | ||
48 | |||
49 | public string ChildGroupRef | ||
50 | { | ||
51 | get => this.Fields[(int)GroupGroupSymbol.SymbolFields.ChildGroupRef].AsString(); | ||
52 | set => this.Set((int)GroupGroupSymbol.SymbolFields.ChildGroupRef, value); | ||
53 | } | ||
54 | |||
55 | } | ||
56 | } | ||
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 | ||
22 | namespace WixToolset.Util.Symbols | 32 | namespace 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 | } | ||
diff --git a/src/ext/Util/wixext/Symbols/UtilSymbolDefinitions.cs b/src/ext/Util/wixext/Symbols/UtilSymbolDefinitions.cs index 8152868f..43d0fca0 100644 --- a/src/ext/Util/wixext/Symbols/UtilSymbolDefinitions.cs +++ b/src/ext/Util/wixext/Symbols/UtilSymbolDefinitions.cs | |||
@@ -12,6 +12,8 @@ namespace WixToolset.Util | |||
12 | FileShare, | 12 | FileShare, |
13 | FileSharePermissions, | 13 | FileSharePermissions, |
14 | Group, | 14 | Group, |
15 | Group6, | ||
16 | GroupGroup, | ||
15 | Perfmon, | 17 | Perfmon, |
16 | PerfmonManifest, | 18 | PerfmonManifest, |
17 | PerformanceCategory, | 19 | PerformanceCategory, |
@@ -59,6 +61,12 @@ namespace WixToolset.Util | |||
59 | case UtilSymbolDefinitionType.Group: | 61 | case UtilSymbolDefinitionType.Group: |
60 | return UtilSymbolDefinitions.Group; | 62 | return UtilSymbolDefinitions.Group; |
61 | 63 | ||
64 | case UtilSymbolDefinitionType.Group6: | ||
65 | return UtilSymbolDefinitions.Group6; | ||
66 | |||
67 | case UtilSymbolDefinitionType.GroupGroup: | ||
68 | return UtilSymbolDefinitions.GroupGroup; | ||
69 | |||
62 | case UtilSymbolDefinitionType.Perfmon: | 70 | case UtilSymbolDefinitionType.Perfmon: |
63 | return UtilSymbolDefinitions.Perfmon; | 71 | return UtilSymbolDefinitions.Perfmon; |
64 | 72 | ||