aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data/Symbols/WixBundleExePackageSymbol.cs
blob: 8a8cff1b1bf47c6975b2c75339cc000158bbd824 (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
// 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.Symbols;

    public static partial class SymbolDefinitions
    {
        public static readonly IntermediateSymbolDefinition WixBundleExePackage = new IntermediateSymbolDefinition(
            SymbolDefinitionType.WixBundleExePackage,
            new[]
            {
                new IntermediateFieldDefinition(nameof(WixBundleExePackageSymbolFields.Attributes), IntermediateFieldType.Number),
                new IntermediateFieldDefinition(nameof(WixBundleExePackageSymbolFields.DetectCondition), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixBundleExePackageSymbolFields.InstallCommand), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixBundleExePackageSymbolFields.RepairCommand), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixBundleExePackageSymbolFields.UninstallCommand), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixBundleExePackageSymbolFields.ExeProtocol), IntermediateFieldType.String),
            },
            typeof(WixBundleExePackageSymbol));
    }
}

namespace WixToolset.Data.Symbols
{
    using System;

    public enum WixBundleExePackageSymbolFields
    {
        Attributes,
        DetectCondition,
        InstallCommand,
        RepairCommand,
        UninstallCommand,
        ExeProtocol,
    }

    [Flags]
    public enum WixBundleExePackageAttributes
    {
        None = 0,
    }

    public class WixBundleExePackageSymbol : IntermediateSymbol
    {
        public WixBundleExePackageSymbol() : base(SymbolDefinitions.WixBundleExePackage, null, null)
        {
        }

        public WixBundleExePackageSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixBundleExePackage, sourceLineNumber, id)
        {
        }

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

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

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

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

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

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

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

        public bool Repairable => !String.IsNullOrEmpty(this.RepairCommand);
    }
}