aboutsummaryrefslogtreecommitdiff
path: root/src/ext/Util/wixext/Symbols/UserGroupSymbol.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2021-05-03 09:55:22 -0700
committerRob Mensching <rob@firegiant.com>2021-05-03 09:55:22 -0700
commitff659159e041bf6c083e6b7fcb9b726065a9dd73 (patch)
treeea95bf3d3e031edcee65de33b9e6954178be669c /src/ext/Util/wixext/Symbols/UserGroupSymbol.cs
parent8a8a25695351ee542f08886a9d0957c78c6af366 (diff)
downloadwix-ff659159e041bf6c083e6b7fcb9b726065a9dd73.tar.gz
wix-ff659159e041bf6c083e6b7fcb9b726065a9dd73.tar.bz2
wix-ff659159e041bf6c083e6b7fcb9b726065a9dd73.zip
Move Util.wixext into ext
Diffstat (limited to 'src/ext/Util/wixext/Symbols/UserGroupSymbol.cs')
-rw-r--r--src/ext/Util/wixext/Symbols/UserGroupSymbol.cs55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/ext/Util/wixext/Symbols/UserGroupSymbol.cs b/src/ext/Util/wixext/Symbols/UserGroupSymbol.cs
new file mode 100644
index 00000000..c8f3998e
--- /dev/null
+++ b/src/ext/Util/wixext/Symbols/UserGroupSymbol.cs
@@ -0,0 +1,55 @@
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.Util
4{
5 using WixToolset.Data;
6 using WixToolset.Util.Symbols;
7
8 public static partial class UtilSymbolDefinitions
9 {
10 public static readonly IntermediateSymbolDefinition UserGroup = new IntermediateSymbolDefinition(
11 UtilSymbolDefinitionType.UserGroup.ToString(),
12 new[]
13 {
14 new IntermediateFieldDefinition(nameof(UserGroupSymbolFields.UserRef), IntermediateFieldType.String),
15 new IntermediateFieldDefinition(nameof(UserGroupSymbolFields.GroupRef), IntermediateFieldType.String),
16 },
17 typeof(UserGroupSymbol));
18 }
19}
20
21namespace WixToolset.Util.Symbols
22{
23 using WixToolset.Data;
24
25 public enum UserGroupSymbolFields
26 {
27 UserRef,
28 GroupRef,
29 }
30
31 public class UserGroupSymbol : IntermediateSymbol
32 {
33 public UserGroupSymbol() : base(UtilSymbolDefinitions.UserGroup, null, null)
34 {
35 }
36
37 public UserGroupSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilSymbolDefinitions.UserGroup, sourceLineNumber, id)
38 {
39 }
40
41 public IntermediateField this[UserGroupSymbolFields index] => this.Fields[(int)index];
42
43 public string UserRef
44 {
45 get => this.Fields[(int)UserGroupSymbolFields.UserRef].AsString();
46 set => this.Set((int)UserGroupSymbolFields.UserRef, value);
47 }
48
49 public string GroupRef
50 {
51 get => this.Fields[(int)UserGroupSymbolFields.GroupRef].AsString();
52 set => this.Set((int)UserGroupSymbolFields.GroupRef, value);
53 }
54 }
55} \ No newline at end of file