From a1307cd4e76a89598c53cb68309358a7012db553 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Fri, 9 Sep 2022 16:03:29 -0500 Subject: Move `Bundle/@CommandLineVariables` into Bal.wixext. Implements 6858 --- .../wixext/Symbols/WixStdbaCommandLineSymbol.cs | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/ext/Bal/wixext/Symbols/WixStdbaCommandLineSymbol.cs (limited to 'src/ext/Bal/wixext/Symbols/WixStdbaCommandLineSymbol.cs') diff --git a/src/ext/Bal/wixext/Symbols/WixStdbaCommandLineSymbol.cs b/src/ext/Bal/wixext/Symbols/WixStdbaCommandLineSymbol.cs new file mode 100644 index 00000000..3b3823f3 --- /dev/null +++ b/src/ext/Bal/wixext/Symbols/WixStdbaCommandLineSymbol.cs @@ -0,0 +1,54 @@ +// 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. + +namespace WixToolset.Bal +{ + using WixToolset.Data; + using WixToolset.Bal.Symbols; + + public static partial class BalSymbolDefinitions + { + public static readonly IntermediateSymbolDefinition WixStdbaCommandLine = new IntermediateSymbolDefinition( + BalSymbolDefinitionType.WixStdbaCommandLine.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(WixStdbaCommandLineSymbolFields.VariableType), IntermediateFieldType.Number), + }, + typeof(WixStdbaCommandLineSymbol)); + } +} + +namespace WixToolset.Bal.Symbols +{ + using System; + using WixToolset.Data; + + public enum WixStdbaCommandLineSymbolFields + { + VariableType, + } + + public enum WixStdbaCommandLineVariableType + { + CaseSensitive, + CaseInsensitive, + } + + public class WixStdbaCommandLineSymbol : IntermediateSymbol + { + public WixStdbaCommandLineSymbol() : base(BalSymbolDefinitions.WixStdbaCommandLine, null, null) + { + } + + public WixStdbaCommandLineSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(BalSymbolDefinitions.WixStdbaCommandLine, sourceLineNumber, id) + { + } + + public IntermediateField this[WixStdbaCommandLineSymbolFields index] => this.Fields[(int)index]; + + public WixStdbaCommandLineVariableType VariableType + { + get => (WixStdbaCommandLineVariableType)this.Fields[(int)WixStdbaCommandLineSymbolFields.VariableType].AsNumber(); + set => this.Set((int)WixStdbaCommandLineSymbolFields.VariableType, (int)value); + } + } +} -- cgit v1.2.3-55-g6feb