| 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.BootstrapperApplications |
| 4 | { |
| 5 | using WixToolset.Data; |
| 6 | using WixToolset.BootstrapperApplications.Symbols; |
| 7 | |
| 8 | public static partial class BalSymbolDefinitions |
| 9 | { |
| 10 | public static readonly IntermediateSymbolDefinition WixBalPackageInfo = new IntermediateSymbolDefinition( |
| 11 | BalSymbolDefinitionType.WixBalPackageInfo.ToString(), |
| 12 | new[] |
| 13 | { |
| 14 | new IntermediateFieldDefinition(nameof(WixBalPackageInfoSymbolFields.PackageId), IntermediateFieldType.String), |
| 15 | new IntermediateFieldDefinition(nameof(WixBalPackageInfoSymbolFields.DisplayInternalUICondition), IntermediateFieldType.String), |
| 16 | new IntermediateFieldDefinition(nameof(WixBalPackageInfoSymbolFields.PrimaryPackageType), IntermediateFieldType.Number), |
| 17 | }, |
| 18 | typeof(WixBalPackageInfoSymbol)); |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | namespace WixToolset.BootstrapperApplications.Symbols |
| 23 | { |
| 24 | using WixToolset.Data; |
| 25 | |
| 26 | public enum WixBalPackageInfoSymbolFields |
| 27 | { |
| 28 | PackageId, |
| 29 | DisplayInternalUICondition, |
| 30 | PrimaryPackageType, |
| 31 | } |
| 32 | |
| 33 | public enum BalPrimaryPackageType |
| 34 | { |
| 35 | None, |
| 36 | Default, |
| 37 | X86, |
| 38 | X64, |
| 39 | ARM64, |
| 40 | } |
| 41 | |
| 42 | public class WixBalPackageInfoSymbol : IntermediateSymbol |
| 43 | { |
| 44 | public WixBalPackageInfoSymbol() : base(BalSymbolDefinitions.WixBalPackageInfo, null, null) |
| 45 | { |
| 46 | } |
| 47 | |
| 48 | public WixBalPackageInfoSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(BalSymbolDefinitions.WixBalPackageInfo, sourceLineNumber, id) |
| 49 | { |
| 50 | } |
| 51 | |
| 52 | public IntermediateField this[WixBalPackageInfoSymbolFields index] => this.Fields[(int)index]; |
| 53 | |
| 54 | public string PackageId |
| 55 | { |
| 56 | get => this.Fields[(int)WixBalPackageInfoSymbolFields.PackageId].AsString(); |
| 57 | set => this.Set((int)WixBalPackageInfoSymbolFields.PackageId, value); |
| 58 | } |
| 59 | |
| 60 | public string DisplayInternalUICondition |
| 61 | { |
| 62 | get => this.Fields[(int)WixBalPackageInfoSymbolFields.DisplayInternalUICondition].AsString(); |
| 63 | set => this.Set((int)WixBalPackageInfoSymbolFields.DisplayInternalUICondition, value); |
| 64 | } |
| 65 | |
| 66 | public BalPrimaryPackageType PrimaryPackageType |
| 67 | { |
| 68 | get => (BalPrimaryPackageType)this.Fields[(int)WixBalPackageInfoSymbolFields.PrimaryPackageType].AsNumber(); |
| 69 | set => this.Set((int)WixBalPackageInfoSymbolFields.PrimaryPackageType, (int)value); |
| 70 | } |
| 71 | } |
| 72 | } |