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 --- src/api/burn/WixToolset.Mba.Core/BundleInfo.cs | 99 -------------------------- 1 file changed, 99 deletions(-) delete mode 100644 src/api/burn/WixToolset.Mba.Core/BundleInfo.cs (limited to 'src/api/burn/WixToolset.Mba.Core/BundleInfo.cs') diff --git a/src/api/burn/WixToolset.Mba.Core/BundleInfo.cs b/src/api/burn/WixToolset.Mba.Core/BundleInfo.cs deleted file mode 100644 index 0039f375..00000000 --- a/src/api/burn/WixToolset.Mba.Core/BundleInfo.cs +++ /dev/null @@ -1,99 +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.IO; - using System.Xml; - using System.Xml.XPath; - - /// - /// Default implementation of . - /// - public class BundleInfo : IBundleInfo - { - /// - public bool PerMachine { get; internal set; } - - /// - public string Name { get; internal set; } - - /// - public string LogVariable { get; internal set; } - - /// - public IOverridableVariables OverridableVariables { get; internal set; } - - /// - public IDictionary Packages { get; internal set; } - - internal BundleInfo() - { - this.Packages = new Dictionary(); - } - - /// - public IPackageInfo AddRelatedBundleAsPackage(string productCode, RelationType relationType, bool perMachine, string version) - { - var package = PackageInfo.GetRelatedBundleAsPackage(productCode, relationType, perMachine, version); - this.Packages.Add(package.Id, package); - return package; - } - - /// - public IPackageInfo AddUpdateBundleAsPackage(string packageId) - { - var package = PackageInfo.GetUpdateBundleAsPackage(packageId); - this.Packages.Add(package.Id, package); - return package; - } - - /// - /// Parses BA manifest from the given stream. - /// - /// - /// - public static IBundleInfo ParseBundleFromStream(Stream stream) - { - XPathDocument manifest = new XPathDocument(stream); - XPathNavigator root = manifest.CreateNavigator(); - return ParseBundleFromXml(root); - } - - /// - /// Parses BA manifest from the given . - /// - /// The root of the BA manifest. - /// - public static IBundleInfo ParseBundleFromXml(XPathNavigator root) - { - BundleInfo bundle = new BundleInfo(); - - XmlNamespaceManager namespaceManager = new XmlNamespaceManager(root.NameTable); - namespaceManager.AddNamespace("p", BootstrapperApplicationData.XMLNamespace); - XPathNavigator bundleNode = root.SelectSingleNode("/p:BootstrapperApplicationData/p:WixBundleProperties", namespaceManager); - - if (bundleNode == null) - { - throw new Exception("Failed to select bundle information."); - } - - bool? perMachine = BootstrapperApplicationData.GetYesNoAttribute(bundleNode, "PerMachine"); - if (perMachine.HasValue) - { - bundle.PerMachine = perMachine.Value; - } - - bundle.Name = BootstrapperApplicationData.GetAttribute(bundleNode, "DisplayName"); - - bundle.LogVariable = BootstrapperApplicationData.GetAttribute(bundleNode, "LogPathVariable"); - - bundle.OverridableVariables = OverridableVariablesInfo.ParseFromXml(root); - - bundle.Packages = PackageInfo.ParsePackagesFromXml(root); - - return bundle; - } - } -} -- cgit v1.2.3-55-g6feb