aboutsummaryrefslogtreecommitdiff
path: root/src/wixext/Tuples/WixDependencyRefTuple.cs
blob: 6f2aaadfe5f041fb8ba76d57ecfe67e6f1c1c906 (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
// 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.Dependency
{
    using WixToolset.Data;
    using WixToolset.Dependency.Symbols;

    public static partial class DependencySymbolDefinitions
    {
        public static readonly IntermediateSymbolDefinition WixDependencyRef = new IntermediateSymbolDefinition(
            DependencySymbolDefinitionType.WixDependencyRef.ToString(),
            new[]
            {
                new IntermediateFieldDefinition(nameof(WixDependencyRefSymbolFields.WixDependencyProviderRef), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixDependencyRefSymbolFields.WixDependencyRef), IntermediateFieldType.String),
            },
            typeof(WixDependencyRefSymbol));
    }
}

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

    public enum WixDependencyRefSymbolFields
    {
        WixDependencyProviderRef,
        WixDependencyRef,
    }

    public class WixDependencyRefSymbol : IntermediateSymbol
    {
        public WixDependencyRefSymbol() : base(DependencySymbolDefinitions.WixDependencyRef, null, null)
        {
        }

        public WixDependencyRefSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(DependencySymbolDefinitions.WixDependencyRef, sourceLineNumber, id)
        {
        }

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

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

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