| 1 | // 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. |
| 2 | |
| 3 | namespace WixToolset.Netfx |
| 4 | { |
| 5 | using WixToolset.Data; |
| 6 | using WixToolset.Netfx.Symbols; |
| 7 | |
| 8 | public static partial class NetfxSymbolDefinitions |
| 9 | { |
| 10 | public static readonly IntermediateSymbolDefinition NetFxNetCoreSdkSearch = new IntermediateSymbolDefinition( |
| 11 | NetfxSymbolDefinitionType.NetFxNetCoreSdkSearch.ToString(), |
| 12 | new[] |
| 13 | { |
| 14 | new IntermediateFieldDefinition(nameof(NetFxNetCoreSdkSearchSymbolFields.Platform), IntermediateFieldType.Number), |
| 15 | new IntermediateFieldDefinition(nameof(NetFxNetCoreSdkSearchSymbolFields.MajorVersion), IntermediateFieldType.Number), |
| 16 | }, |
| 17 | typeof(NetFxNetCoreSdkSearchSymbol)); |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | namespace WixToolset.Netfx.Symbols |
| 22 | { |
| 23 | using WixToolset.Data; |
| 24 | |
| 25 | public enum NetFxNetCoreSdkSearchSymbolFields |
| 26 | { |
| 27 | Platform, |
| 28 | MajorVersion, |
| 29 | } |
| 30 | |
| 31 | public class NetFxNetCoreSdkSearchSymbol : IntermediateSymbol |
| 32 | { |
| 33 | public NetFxNetCoreSdkSearchSymbol() : base(NetfxSymbolDefinitions.NetFxNetCoreSdkSearch, null, null) |
| 34 | { |
| 35 | } |
| 36 | |
| 37 | public NetFxNetCoreSdkSearchSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(NetfxSymbolDefinitions.NetFxNetCoreSdkSearch, sourceLineNumber, id) |
| 38 | { |
| 39 | } |
| 40 | |
| 41 | public IntermediateField this[NetFxNetCoreSdkSearchSymbolFields index] => this.Fields[(int)index]; |
| 42 | |
| 43 | public NetCoreSearchPlatform Platform |
| 44 | { |
| 45 | get => (NetCoreSearchPlatform)this.Fields[(int)NetFxNetCoreSdkSearchSymbolFields.Platform].AsNumber(); |
| 46 | set => this.Set((int)NetFxNetCoreSdkSearchSymbolFields.Platform, (int)value); |
| 47 | } |
| 48 | |
| 49 | public int MajorVersion |
| 50 | { |
| 51 | get => this.Fields[(int)NetFxNetCoreSdkSearchSymbolFields.MajorVersion].AsNumber(); |
| 52 | set => this.Set((int)NetFxNetCoreSdkSearchSymbolFields.MajorVersion, value); |
| 53 | } |
| 54 | } |
| 55 | } |