aboutsummaryrefslogtreecommitdiff
path: root/src/wixext/Tuples/WixDependencyRefTuple.cs
blob: 3e996f5f16876efdae89f8a2636c56c019accb9a (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.Tuples;

    public static partial class DependencyTupleDefinitions
    {
        public static readonly IntermediateTupleDefinition WixDependencyRef = new IntermediateTupleDefinition(
            DependencyTupleDefinitionType.WixDependencyRef.ToString(),
            new[]
            {
                new IntermediateFieldDefinition(nameof(WixDependencyRefTupleFields.WixDependencyProvider_), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixDependencyRefTupleFields.WixDependency_), IntermediateFieldType.String),
            },
            typeof(WixDependencyRefTuple));
    }
}

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

    public enum WixDependencyRefTupleFields
    {
        WixDependencyProvider_,
        WixDependency_,
    }

    public class WixDependencyRefTuple : IntermediateTuple
    {
        public WixDependencyRefTuple() : base(DependencyTupleDefinitions.WixDependencyRef, null, null)
        {
        }

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

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

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

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