aboutsummaryrefslogtreecommitdiff
path: root/src/wixext/Symbols/WixCloseApplicationSymbol.cs
blob: 0738e3e4c941d95b5469fe9432641a4f14212b9f (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.Symbols;

    public static partial class UtilSymbolDefinitions
    {
        public static readonly IntermediateSymbolDefinition WixCloseApplication = new IntermediateSymbolDefinition(
            UtilSymbolDefinitionType.WixCloseApplication.ToString(),
            new[]
            {
                new IntermediateFieldDefinition(nameof(WixCloseApplicationSymbolFields.Target), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixCloseApplicationSymbolFields.Description), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixCloseApplicationSymbolFields.Condition), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixCloseApplicationSymbolFields.Attributes), IntermediateFieldType.Number),
                new IntermediateFieldDefinition(nameof(WixCloseApplicationSymbolFields.Sequence), IntermediateFieldType.Number),
                new IntermediateFieldDefinition(nameof(WixCloseApplicationSymbolFields.Property), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixCloseApplicationSymbolFields.TerminateExitCode), IntermediateFieldType.Number),
                new IntermediateFieldDefinition(nameof(WixCloseApplicationSymbolFields.Timeout), IntermediateFieldType.Number),
            },
            typeof(WixCloseApplicationSymbol));
    }
}

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

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

    public class WixCloseApplicationSymbol : IntermediateSymbol
    {
        public WixCloseApplicationSymbol() : base(UtilSymbolDefinitions.WixCloseApplication, null, null)
        {
        }

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

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

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

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

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

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

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

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

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

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