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