aboutsummaryrefslogtreecommitdiff
path: root/src/api/wix/WixToolset.Data/Symbols/MsiEmbeddedUISymbol.cs
blob: 87c9481ad286a3400dce9f76897138d5f2221300 (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
// 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 MsiEmbeddedUI = new IntermediateSymbolDefinition(
            SymbolDefinitionType.MsiEmbeddedUI,
            new[]
            {
                new IntermediateFieldDefinition(nameof(MsiEmbeddedUISymbolFields.FileName), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(MsiEmbeddedUISymbolFields.EntryPoint), IntermediateFieldType.Bool),
                new IntermediateFieldDefinition(nameof(MsiEmbeddedUISymbolFields.SupportsBasicUI), IntermediateFieldType.Bool),
                new IntermediateFieldDefinition(nameof(MsiEmbeddedUISymbolFields.MessageFilter), IntermediateFieldType.Number),
                new IntermediateFieldDefinition(nameof(MsiEmbeddedUISymbolFields.Source), IntermediateFieldType.Path),
            },
            typeof(MsiEmbeddedUISymbol));
    }
}

namespace WixToolset.Data.Symbols
{
    public enum MsiEmbeddedUISymbolFields
    {
        FileName,
        EntryPoint,
        SupportsBasicUI,
        MessageFilter,
        Source,
    }

    public class MsiEmbeddedUISymbol : IntermediateSymbol
    {
        public MsiEmbeddedUISymbol() : base(SymbolDefinitions.MsiEmbeddedUI, null, null)
        {
        }

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

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

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

        public bool EntryPoint
        {
            get => this.Fields[(int)MsiEmbeddedUISymbolFields.EntryPoint].AsBool();
            set => this.Set((int)MsiEmbeddedUISymbolFields.EntryPoint, value);
        }

        public bool SupportsBasicUI
        {
            get => this.Fields[(int)MsiEmbeddedUISymbolFields.SupportsBasicUI].AsBool();
            set => this.Set((int)MsiEmbeddedUISymbolFields.SupportsBasicUI, value);
        }

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

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