diff options
Diffstat (limited to 'src/wixext/Tuples/GroupTuple.cs')
-rw-r--r-- | src/wixext/Tuples/GroupTuple.cs | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/src/wixext/Tuples/GroupTuple.cs b/src/wixext/Tuples/GroupTuple.cs new file mode 100644 index 00000000..97335714 --- /dev/null +++ b/src/wixext/Tuples/GroupTuple.cs | |||
@@ -0,0 +1,71 @@ | |||
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.Tuples; | ||
7 | |||
8 | public static partial class UtilTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition Group = new IntermediateTupleDefinition( | ||
11 | UtilTupleDefinitionType.Group.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(GroupTupleFields.Group), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(GroupTupleFields.Component_), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(GroupTupleFields.Name), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(GroupTupleFields.Domain), IntermediateFieldType.String), | ||
18 | }, | ||
19 | typeof(GroupTuple)); | ||
20 | } | ||
21 | } | ||
22 | |||
23 | namespace WixToolset.Util.Tuples | ||
24 | { | ||
25 | using WixToolset.Data; | ||
26 | |||
27 | public enum GroupTupleFields | ||
28 | { | ||
29 | Group, | ||
30 | Component_, | ||
31 | Name, | ||
32 | Domain, | ||
33 | } | ||
34 | |||
35 | public class GroupTuple : IntermediateTuple | ||
36 | { | ||
37 | public GroupTuple() : base(UtilTupleDefinitions.Group, null, null) | ||
38 | { | ||
39 | } | ||
40 | |||
41 | public GroupTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilTupleDefinitions.Group, sourceLineNumber, id) | ||
42 | { | ||
43 | } | ||
44 | |||
45 | public IntermediateField this[GroupTupleFields index] => this.Fields[(int)index]; | ||
46 | |||
47 | public string Group | ||
48 | { | ||
49 | get => this.Fields[(int)GroupTupleFields.Group].AsString(); | ||
50 | set => this.Set((int)GroupTupleFields.Group, value); | ||
51 | } | ||
52 | |||
53 | public string Component_ | ||
54 | { | ||
55 | get => this.Fields[(int)GroupTupleFields.Component_].AsString(); | ||
56 | set => this.Set((int)GroupTupleFields.Component_, value); | ||
57 | } | ||
58 | |||
59 | public string Name | ||
60 | { | ||
61 | get => this.Fields[(int)GroupTupleFields.Name].AsString(); | ||
62 | set => this.Set((int)GroupTupleFields.Name, value); | ||
63 | } | ||
64 | |||
65 | public string Domain | ||
66 | { | ||
67 | get => this.Fields[(int)GroupTupleFields.Domain].AsString(); | ||
68 | set => this.Set((int)GroupTupleFields.Domain, value); | ||
69 | } | ||
70 | } | ||
71 | } \ No newline at end of file | ||