| 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 NetFxNetCoreSearch = new IntermediateSymbolDefinition( |
| 11 | NetfxSymbolDefinitionType.NetFxNetCoreSearch.ToString(), |
| 12 | new[] |
| 13 | { |
| 14 | new IntermediateFieldDefinition(nameof(NetFxNetCoreSearchSymbolFields.RuntimeType), IntermediateFieldType.Number), |
| 15 | new IntermediateFieldDefinition(nameof(NetFxNetCoreSearchSymbolFields.Platform), IntermediateFieldType.Number), |
| 16 | new IntermediateFieldDefinition(nameof(NetFxNetCoreSearchSymbolFields.MajorVersion), IntermediateFieldType.Number), |
| 17 | }, |
| 18 | typeof(NetFxNetCoreSearchSymbol)); |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | namespace WixToolset.Netfx.Symbols |
| 23 | { |
| 24 | using WixToolset.Data; |
| 25 | |
| 26 | public enum NetCoreSearchRuntimeType |
| 27 | { |
| 28 | Core, |
| 29 | Aspnet, |
| 30 | Desktop, |
| 31 | } |
| 32 | |
| 33 | public enum NetCoreSearchPlatform |
| 34 | { |
| 35 | X86, |
| 36 | X64, |
| 37 | Arm64, |
| 38 | } |
| 39 | |
| 40 | public enum NetFxNetCoreSearchSymbolFields |
| 41 | { |
| 42 | RuntimeType, |
| 43 | Platform, |
| 44 | MajorVersion, |
| 45 | } |
| 46 | |
| 47 | public class NetFxNetCoreSearchSymbol : IntermediateSymbol |
| 48 | { |
| 49 | public NetFxNetCoreSearchSymbol() : base(NetfxSymbolDefinitions.NetFxNetCoreSearch, null, null) |
| 50 | { |
| 51 | } |
| 52 | |
| 53 | public NetFxNetCoreSearchSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(NetfxSymbolDefinitions.NetFxNetCoreSearch, sourceLineNumber, id) |
| 54 | { |
| 55 | } |
| 56 | |
| 57 | public IntermediateField this[NetFxNetCoreSearchSymbolFields index] => this.Fields[(int)index]; |
| 58 | |
| 59 | public NetCoreSearchRuntimeType RuntimeType |
| 60 | { |
| 61 | get => (NetCoreSearchRuntimeType)this.Fields[(int)NetFxNetCoreSearchSymbolFields.RuntimeType].AsNumber(); |
| 62 | set => this.Set((int)NetFxNetCoreSearchSymbolFields.RuntimeType, (int)value); |
| 63 | } |
| 64 | |
| 65 | public NetCoreSearchPlatform Platform |
| 66 | { |
| 67 | get => (NetCoreSearchPlatform)this.Fields[(int)NetFxNetCoreSearchSymbolFields.Platform].AsNumber(); |
| 68 | set => this.Set((int)NetFxNetCoreSearchSymbolFields.Platform, (int)value); |
| 69 | } |
| 70 | |
| 71 | public int MajorVersion |
| 72 | { |
| 73 | get => this.Fields[(int)NetFxNetCoreSearchSymbolFields.MajorVersion].AsNumber(); |
| 74 | set => this.Set((int)NetFxNetCoreSearchSymbolFields.MajorVersion, value); |
| 75 | } |
| 76 | } |
| 77 | } |