summaryrefslogtreecommitdiff
path: root/src/ext/NetFx/wixext/Symbols/NetFxNetCoreSearchSdkSymbol.cs
blob: a368068e53ff168df7c28733b4de4654bcabdb5f (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
// 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.Netfx
{
    using WixToolset.Data;
    using WixToolset.Netfx.Symbols;

    public static partial class NetfxSymbolDefinitions
    {
        public static readonly IntermediateSymbolDefinition NetFxNetCoreSdkSearch = new IntermediateSymbolDefinition(
            NetfxSymbolDefinitionType.NetFxNetCoreSdkSearch.ToString(),
            new[]
            {
                new IntermediateFieldDefinition(nameof(NetFxNetCoreSdkSearchSymbolFields.Platform), IntermediateFieldType.Number),
                new IntermediateFieldDefinition(nameof(NetFxNetCoreSdkSearchSymbolFields.MajorVersion), IntermediateFieldType.Number),
            },
            typeof(NetFxNetCoreSdkSearchSymbol));
    }
}

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

    public enum NetFxNetCoreSdkSearchSymbolFields
    {
        Platform,
        MajorVersion,
    }

    public class NetFxNetCoreSdkSearchSymbol : IntermediateSymbol
    {
        public NetFxNetCoreSdkSearchSymbol() : base(NetfxSymbolDefinitions.NetFxNetCoreSdkSearch, null, null)
        {
        }

        public NetFxNetCoreSdkSearchSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(NetfxSymbolDefinitions.NetFxNetCoreSdkSearch, sourceLineNumber, id)
        {
        }

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

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

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