From 3d2d46f62fc01e2653d0251ad9703090574e7c41 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 6 Mar 2024 14:48:10 -0800 Subject: Better .nupkg names --- .../WixToolset.Mba.Core/OverridableVariables.cs | 87 ---------------------- 1 file changed, 87 deletions(-) delete mode 100644 src/api/burn/WixToolset.Mba.Core/OverridableVariables.cs (limited to 'src/api/burn/WixToolset.Mba.Core/OverridableVariables.cs') diff --git a/src/api/burn/WixToolset.Mba.Core/OverridableVariables.cs b/src/api/burn/WixToolset.Mba.Core/OverridableVariables.cs deleted file mode 100644 index 121c6aee..00000000 --- a/src/api/burn/WixToolset.Mba.Core/OverridableVariables.cs +++ /dev/null @@ -1,87 +0,0 @@ -// 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.Mba.Core -{ - using System; - using System.Collections.Generic; - using System.Xml; - using System.Xml.XPath; - - /// - /// Default implementation of . - /// - public class OverridableVariablesInfo : IOverridableVariables - { - /// - public VariableCommandLineType CommandLineType { get; internal set; } - - /// - public IDictionary Variables { get; internal set; } - - internal OverridableVariablesInfo() { } - - /// - /// Parses the overridable variable info from the BA manifest. - /// - /// XML root - /// The parsed information. - public static IOverridableVariables ParseFromXml(XPathNavigator root) - { - XmlNamespaceManager namespaceManager = new XmlNamespaceManager(root.NameTable); - namespaceManager.AddNamespace("p", BootstrapperApplicationData.XMLNamespace); - XPathNavigator commandLineNode = root.SelectSingleNode("/p:BootstrapperApplicationData/p:WixStdbaCommandLine", namespaceManager); - XPathNodeIterator nodes = root.Select("/p:BootstrapperApplicationData/p:WixStdbaOverridableVariable", namespaceManager); - - var overridableVariables = new OverridableVariablesInfo(); - IEqualityComparer variableNameComparer; - - if (commandLineNode == null) - { - overridableVariables.CommandLineType = VariableCommandLineType.CaseSensitive; - variableNameComparer = StringComparer.InvariantCulture; - } - else - { - string variablesValue = BootstrapperApplicationData.GetAttribute(commandLineNode, "Variables"); - - if (variablesValue == null) - { - throw new Exception("Failed to get command line variable type."); - } - - if (variablesValue.Equals("caseInsensitive", StringComparison.InvariantCulture)) - { - overridableVariables.CommandLineType = VariableCommandLineType.CaseInsensitive; - variableNameComparer = StringComparer.InvariantCultureIgnoreCase; - } - else if (variablesValue.Equals("caseSensitive", StringComparison.InvariantCulture)) - { - overridableVariables.CommandLineType = VariableCommandLineType.CaseSensitive; - variableNameComparer = StringComparer.InvariantCulture; - } - else - { - throw new Exception(String.Format("Unknown command line variable type: '{0}'", variablesValue)); - } - } - - overridableVariables.Variables = new Dictionary(variableNameComparer); - - foreach (XPathNavigator node in nodes) - { - var variable = new OverridableVariableInfo(); - - string name = BootstrapperApplicationData.GetAttribute(node, "Name"); - if (name == null) - { - throw new Exception("Failed to get name for overridable variable."); - } - variable.Name = name; - - overridableVariables.Variables.Add(variable.Name, variable); - } - - return overridableVariables; - } - } -} -- cgit v1.2.3-55-g6feb