| 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 WixPrereqOptions = new IntermediateSymbolDefinition( |
| 11 | BalSymbolDefinitionType.WixPrereqOptions.ToString(), |
| 12 | new[] |
| 13 | { |
| 14 | new IntermediateFieldDefinition(nameof(WixPrereqOptionsSymbolFields.Primary), IntermediateFieldType.Number), |
| 15 | new IntermediateFieldDefinition(nameof(WixPrereqOptionsSymbolFields.HandleHelp), IntermediateFieldType.Number), |
| 16 | new IntermediateFieldDefinition(nameof(WixPrereqOptionsSymbolFields.HandleLayout), IntermediateFieldType.Number), |
| 17 | }, |
| 18 | typeof(WixPrereqOptionsSymbol)); |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | namespace WixToolset.BootstrapperApplications.Symbols |
| 23 | { |
| 24 | using WixToolset.Data; |
| 25 | |
| 26 | public enum WixPrereqOptionsSymbolFields |
| 27 | { |
| 28 | Primary, |
| 29 | HandleHelp, |
| 30 | HandleLayout, |
| 31 | } |
| 32 | |
| 33 | public class WixPrereqOptionsSymbol : IntermediateSymbol |
| 34 | { |
| 35 | public WixPrereqOptionsSymbol() : base(BalSymbolDefinitions.WixPrereqOptions, null, null) |
| 36 | { |
| 37 | } |
| 38 | |
| 39 | public WixPrereqOptionsSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(BalSymbolDefinitions.WixPrereqOptions, sourceLineNumber, id) |
| 40 | { |
| 41 | } |
| 42 | |
| 43 | public IntermediateField this[WixPrereqOptionsSymbolFields index] => this.Fields[(int)index]; |
| 44 | |
| 45 | public int Primary |
| 46 | { |
| 47 | get => this.Fields[(int)WixPrereqOptionsSymbolFields.Primary].AsNumber(); |
| 48 | set => this.Set((int)WixPrereqOptionsSymbolFields.Primary, value); |
| 49 | } |
| 50 | |
| 51 | public int? HandleHelp |
| 52 | { |
| 53 | get => (int?)this.Fields[(int)WixPrereqOptionsSymbolFields.HandleHelp]; |
| 54 | set => this.Set((int)WixPrereqOptionsSymbolFields.HandleHelp, value); |
| 55 | } |
| 56 | |
| 57 | public int? HandleLayout |
| 58 | { |
| 59 | get => (int?)this.Fields[(int)WixPrereqOptionsSymbolFields.HandleLayout]; |
| 60 | set => this.Set((int)WixPrereqOptionsSymbolFields.HandleLayout, value); |
| 61 | } |
| 62 | } |
| 63 | } |