aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data/Tuples/WixBundlePatchTargetCodeTuple.cs
blob: f8752067f78054107dbc61f469021822c1200fb4 (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
57
58
59
60
// 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.Data
{
    using WixToolset.Data.Tuples;

    public static partial class TupleDefinitions
    {
        public static readonly IntermediateTupleDefinition WixBundlePatchTargetCode = new IntermediateTupleDefinition(
            TupleDefinitionType.WixBundlePatchTargetCode,
            new[]
            {
                new IntermediateFieldDefinition(nameof(WixBundlePatchTargetCodeTupleFields.PackageId), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixBundlePatchTargetCodeTupleFields.TargetCode), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixBundlePatchTargetCodeTupleFields.Attributes), IntermediateFieldType.Number),
            },
            typeof(WixBundlePatchTargetCodeTuple));
    }
}

namespace WixToolset.Data.Tuples
{
    public enum WixBundlePatchTargetCodeTupleFields
    {
        PackageId,
        TargetCode,
        Attributes,
    }

    public class WixBundlePatchTargetCodeTuple : IntermediateTuple
    {
        public WixBundlePatchTargetCodeTuple() : base(TupleDefinitions.WixBundlePatchTargetCode, null, null)
        {
        }

        public WixBundlePatchTargetCodeTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundlePatchTargetCode, sourceLineNumber, id)
        {
        }

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

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

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

        public int Attributes
        {
            get => (int)this.Fields[(int)WixBundlePatchTargetCodeTupleFields.Attributes];
            set => this.Set((int)WixBundlePatchTargetCodeTupleFields.Attributes, value);
        }
    }
}