aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data/Tuples/MsiEmbeddedUITuple.cs
blob: 83cfcc43b6320affd37af5e8fc36074e1d0008a2 (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.Tuples;

    public static partial class TupleDefinitions
    {
        public static readonly IntermediateTupleDefinition MsiEmbeddedUI = new IntermediateTupleDefinition(
            TupleDefinitionType.MsiEmbeddedUI,
            new[]
            {
                new IntermediateFieldDefinition(nameof(MsiEmbeddedUITupleFields.FileName), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(MsiEmbeddedUITupleFields.EntryPoint), IntermediateFieldType.Bool),
                new IntermediateFieldDefinition(nameof(MsiEmbeddedUITupleFields.SupportsBasicUI), IntermediateFieldType.Bool),
                new IntermediateFieldDefinition(nameof(MsiEmbeddedUITupleFields.MessageFilter), IntermediateFieldType.Number),
                new IntermediateFieldDefinition(nameof(MsiEmbeddedUITupleFields.Source), IntermediateFieldType.Path),
            },
            typeof(MsiEmbeddedUITuple));
    }
}

namespace WixToolset.Data.Tuples
{
    public enum MsiEmbeddedUITupleFields
    {
        FileName,
        EntryPoint,
        SupportsBasicUI,
        MessageFilter,
        Source,
    }

    public class MsiEmbeddedUITuple : IntermediateTuple
    {
        public MsiEmbeddedUITuple() : base(TupleDefinitions.MsiEmbeddedUI, null, null)
        {
        }

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

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

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

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

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

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

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