aboutsummaryrefslogtreecommitdiff
path: root/src/ext/Util/wixext/Symbols/GroupGroupSymbol.cs
blob: a4ec6dddc77bcb6a244abc519e5eb9741348c49c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// 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.

namespace WixToolset.Util
{
    using WixToolset.Data;
    using WixToolset.Util.Symbols;

    public static partial class UtilSymbolDefinitions
    {
        public static readonly IntermediateSymbolDefinition GroupGroup = new IntermediateSymbolDefinition(
            UtilSymbolDefinitionType.GroupGroup.ToString(),
            new[]
            {
                new IntermediateFieldDefinition(nameof(GroupGroupSymbolFields.ParentGroupRef), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(GroupGroupSymbolFields.ChildGroupRef), IntermediateFieldType.String),
            },
            typeof(UserGroupSymbol));
    }
}

namespace WixToolset.Util.Symbols
{
    using WixToolset.Data;

    public enum GroupGroupSymbolFields
    {
        ParentGroupRef,
        ChildGroupRef,
    }

    public class GroupGroupSymbol : IntermediateSymbol
    {
        public GroupGroupSymbol() : base(UtilSymbolDefinitions.GroupGroup, null, null)
        {
        }

        public GroupGroupSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilSymbolDefinitions.GroupGroup, sourceLineNumber, id)
        {
        }

        public IntermediateField this[GroupGroupSymbolFields index] => this.Fields[(int)index];

        public string ParentGroupRef
        {
            get => this.Fields[(int)GroupGroupSymbolFields.ParentGroupRef].AsString();
            set => this.Set((int)GroupGroupSymbolFields.ParentGroupRef, value);
        }

        public string ChildGroupRef
        {
            get => this.Fields[(int)GroupGroupSymbolFields.ChildGroupRef].AsString();
            set => this.Set((int)GroupGroupSymbolFields.ChildGroupRef, value);
        }

    }
}