aboutsummaryrefslogtreecommitdiff
path: root/src/wixext/Tuples/WixCloseApplicationTuple.cs
blob: 2deebbae0f078c941cea919f60defde7919a0a5a (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
// 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.Tuples;

    public static partial class UtilTupleDefinitions
    {
        public static readonly IntermediateTupleDefinition WixCloseApplication = new IntermediateTupleDefinition(
            UtilTupleDefinitionType.WixCloseApplication.ToString(),
            new[]
            {
                new IntermediateFieldDefinition(nameof(WixCloseApplicationTupleFields.Target), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixCloseApplicationTupleFields.Description), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixCloseApplicationTupleFields.Condition), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixCloseApplicationTupleFields.Attributes), IntermediateFieldType.Number),
                new IntermediateFieldDefinition(nameof(WixCloseApplicationTupleFields.Sequence), IntermediateFieldType.Number),
                new IntermediateFieldDefinition(nameof(WixCloseApplicationTupleFields.Property), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixCloseApplicationTupleFields.TerminateExitCode), IntermediateFieldType.Number),
                new IntermediateFieldDefinition(nameof(WixCloseApplicationTupleFields.Timeout), IntermediateFieldType.Number),
            },
            typeof(WixCloseApplicationTuple));
    }
}

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

    public enum WixCloseApplicationTupleFields
    {
        Target,
        Description,
        Condition,
        Attributes,
        Sequence,
        Property,
        TerminateExitCode,
        Timeout,
    }

    public class WixCloseApplicationTuple : IntermediateTuple
    {
        public WixCloseApplicationTuple() : base(UtilTupleDefinitions.WixCloseApplication, null, null)
        {
        }

        public WixCloseApplicationTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilTupleDefinitions.WixCloseApplication, sourceLineNumber, id)
        {
        }

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

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

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

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

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

        public int? Sequence
        {
            get => this.Fields[(int)WixCloseApplicationTupleFields.Sequence].AsNullableNumber();
            set => this.Set((int)WixCloseApplicationTupleFields.Sequence, value);
        }

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

        public int? TerminateExitCode
        {
            get => this.Fields[(int)WixCloseApplicationTupleFields.TerminateExitCode].AsNullableNumber();
            set => this.Set((int)WixCloseApplicationTupleFields.TerminateExitCode, value);
        }

        public int? Timeout
        {
            get => this.Fields[(int)WixCloseApplicationTupleFields.Timeout].AsNullableNumber();
            set => this.Set((int)WixCloseApplicationTupleFields.Timeout, value);
        }
    }
}