From a6f5079719f26ed809f3b60cca6f1d46e9f7423e Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 22 Mar 2022 10:35:47 -0700 Subject: Remove dead code --- .../WixToolset.Extensibility/ExtensionHelper.cs | 55 ------------------- .../wix/WixToolset.Extensibility/IInspectorCore.cs | 15 ------ .../IInspectorExtension.cs | 60 --------------------- .../WixToolset.Extensibility/InspectorExtension.cs | 63 ---------------------- 4 files changed, 193 deletions(-) delete mode 100644 src/api/wix/WixToolset.Extensibility/ExtensionHelper.cs delete mode 100644 src/api/wix/WixToolset.Extensibility/IInspectorCore.cs delete mode 100644 src/api/wix/WixToolset.Extensibility/IInspectorExtension.cs delete mode 100644 src/api/wix/WixToolset.Extensibility/InspectorExtension.cs (limited to 'src/api') diff --git a/src/api/wix/WixToolset.Extensibility/ExtensionHelper.cs b/src/api/wix/WixToolset.Extensibility/ExtensionHelper.cs deleted file mode 100644 index 6b938a65..00000000 --- a/src/api/wix/WixToolset.Extensibility/ExtensionHelper.cs +++ /dev/null @@ -1,55 +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.Extensibility -{ - using System; - using System.Collections.Specialized; - using System.IO; - using System.Reflection; - using System.Xml; - using WixToolset.Data; - using WixToolset.Extensibility; - -#if BRING_BACK_LATER - /// - /// The main class for a WiX extension. - /// - public static class ExtensionHelper - { - /// - /// Help for loading a library from an embedded resource. - /// - /// The assembly containing the embedded resource. - /// The name of the embedded resource being requested. - /// The table definitions to use while loading the library. - /// The loaded library. - public static Library LoadLibraryHelper(Assembly assembly, string resourceName, TableDefinitionCollection tableDefinitions) - { - using (Stream resourceStream = assembly.GetManifestResourceStream(resourceName)) - { - UriBuilder uriBuilder = new UriBuilder(); - uriBuilder.Scheme = "embeddedresource"; - uriBuilder.Path = assembly.Location; - uriBuilder.Fragment = resourceName; - - return Library.Load(resourceStream, uriBuilder.Uri, tableDefinitions, false); - } - } - - /// - /// Helper for loading table definitions from an embedded resource. - /// - /// The assembly containing the embedded resource. - /// The name of the embedded resource being requested. - /// The loaded table definitions. - public static TableDefinitionCollection LoadTableDefinitionHelper(Assembly assembly, string resourceName) - { - using (Stream resourceStream = assembly.GetManifestResourceStream(resourceName)) - using (XmlReader reader = XmlReader.Create(resourceStream)) - { - return TableDefinitionCollection.Load(reader); - } - } - } -#endif -} diff --git a/src/api/wix/WixToolset.Extensibility/IInspectorCore.cs b/src/api/wix/WixToolset.Extensibility/IInspectorCore.cs deleted file mode 100644 index 9420ea05..00000000 --- a/src/api/wix/WixToolset.Extensibility/IInspectorCore.cs +++ /dev/null @@ -1,15 +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.Extensibility -{ - /// - /// Core facilities for inspector extensions. - /// - public interface IInspectorCore - { - /// - /// Gets whether an error occured. - /// - bool EncounteredError { get; } - } -} diff --git a/src/api/wix/WixToolset.Extensibility/IInspectorExtension.cs b/src/api/wix/WixToolset.Extensibility/IInspectorExtension.cs deleted file mode 100644 index 7c488a89..00000000 --- a/src/api/wix/WixToolset.Extensibility/IInspectorExtension.cs +++ /dev/null @@ -1,60 +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.Extensibility -{ - using System; - using System.IO; - using WixToolset.Data; - - /// - /// Interface for inspector extensions. - /// - /// - /// The inspector methods are stateless, but extensions are loaded once. If you want to maintain state, you should check - /// if your data is loaded for each method and, if not, load it. - /// - public interface IInspectorExtension - { - /// - /// Gets or sets the for inspector extensions to use. - /// - IInspectorCore Core { get; set; } - - /// - /// Inspect the source before preprocessing. - /// - /// The source to preprocess. - void InspectSource(Stream source); - - /// - /// Inspect the compiled output. - /// - /// The compiled output. - void InspectIntermediate(Intermediate intermediate); - -#if REWRITE - /// - /// Inspect the output. - /// - /// The output. May be called after linking or binding. - /// - /// To inspect a patch's filtered transforms, enumerate . - /// Transforms where the begins with "#" are - /// called patch transforms and instruct Windows Installer how to apply the - /// authored transforms - those that do not begin with "#". The authored - /// transforms are the primary transforms you'll typically want to inspect - /// and contain your changes to target products. - /// -#endif - /// - void InspectOutput(Intermediate output); - - /// - /// Inspect the final output after binding. - /// - /// The file path to the final bound output. - /// The that contains source line numbers - /// for the database and all rows. - void InspectDatabase(string filePath, Intermediate pdb); - } -} diff --git a/src/api/wix/WixToolset.Extensibility/InspectorExtension.cs b/src/api/wix/WixToolset.Extensibility/InspectorExtension.cs deleted file mode 100644 index 49c3f9de..00000000 --- a/src/api/wix/WixToolset.Extensibility/InspectorExtension.cs +++ /dev/null @@ -1,63 +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.Extensibility -{ - using System; - using System.IO; - using WixToolset.Data; - -#if BRING_THIS_BACK - /// - /// Opitonal base class for inspector extensions. - /// - public class InspectorExtension : IInspectorExtension - { - /// - /// Gets the for inspector extensions to use. - /// - public IInspectorCore Core { get; set; } - - /// - /// Inspect the source before preprocessing. - /// - /// The source to preprocess. - public virtual void InspectSource(Stream source) - { - } - - /// - /// Inspect the compiled output. - /// - /// The compiled output. - public virtual void InspectIntermediate(Intermediate intermediate) - { - } - - /// - /// Inspect the output. - /// - /// The output. May be called after linking or binding. - /// - /// To inspect a patch's filtered transforms, enumerate . - /// Transforms where the begins with "#" are - /// called patch transforms and instruct Windows Installer how to apply the - /// authored transforms - those that do not begin with "#". The authored - /// transforms are the primary transforms you'll typically want to inspect - /// and contain your changes to target products. - /// - public virtual void InspectOutput(Output output) - { - } - - /// - /// Inspect the final output after binding. - /// - /// The file path to the final bound output. - /// The that contains source line numbers - /// for the database and all rows. - public virtual void InspectDatabase(string filePath, Pdb pdb) - { - } - } -#endif -} -- cgit v1.2.3-55-g6feb