aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2022-03-22 10:35:47 -0700
committerRob Mensching <rob@firegiant.com>2022-03-30 14:12:12 -0700
commita6f5079719f26ed809f3b60cca6f1d46e9f7423e (patch)
tree672d67cbc5f64e257c2282a24e336897d80e751b
parentfc3e4722307c86b5d06918f0721b98323735bb40 (diff)
downloadwix-a6f5079719f26ed809f3b60cca6f1d46e9f7423e.tar.gz
wix-a6f5079719f26ed809f3b60cca6f1d46e9f7423e.tar.bz2
wix-a6f5079719f26ed809f3b60cca6f1d46e9f7423e.zip
Remove dead code
-rw-r--r--src/api/wix/WixToolset.Extensibility/ExtensionHelper.cs55
-rw-r--r--src/api/wix/WixToolset.Extensibility/IInspectorCore.cs15
-rw-r--r--src/api/wix/WixToolset.Extensibility/IInspectorExtension.cs60
-rw-r--r--src/api/wix/WixToolset.Extensibility/InspectorExtension.cs63
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Differ.cs11
5 files changed, 0 insertions, 204 deletions
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 @@
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
3namespace WixToolset.Extensibility
4{
5 using System;
6 using System.Collections.Specialized;
7 using System.IO;
8 using System.Reflection;
9 using System.Xml;
10 using WixToolset.Data;
11 using WixToolset.Extensibility;
12
13#if BRING_BACK_LATER
14 /// <summary>
15 /// The main class for a WiX extension.
16 /// </summary>
17 public static class ExtensionHelper
18 {
19 /// <summary>
20 /// Help for loading a library from an embedded resource.
21 /// </summary>
22 /// <param name="assembly">The assembly containing the embedded resource.</param>
23 /// <param name="resourceName">The name of the embedded resource being requested.</param>
24 /// <param name="tableDefinitions">The table definitions to use while loading the library.</param>
25 /// <returns>The loaded library.</returns>
26 public static Library LoadLibraryHelper(Assembly assembly, string resourceName, TableDefinitionCollection tableDefinitions)
27 {
28 using (Stream resourceStream = assembly.GetManifestResourceStream(resourceName))
29 {
30 UriBuilder uriBuilder = new UriBuilder();
31 uriBuilder.Scheme = "embeddedresource";
32 uriBuilder.Path = assembly.Location;
33 uriBuilder.Fragment = resourceName;
34
35 return Library.Load(resourceStream, uriBuilder.Uri, tableDefinitions, false);
36 }
37 }
38
39 /// <summary>
40 /// Helper for loading table definitions from an embedded resource.
41 /// </summary>
42 /// <param name="assembly">The assembly containing the embedded resource.</param>
43 /// <param name="resourceName">The name of the embedded resource being requested.</param>
44 /// <returns>The loaded table definitions.</returns>
45 public static TableDefinitionCollection LoadTableDefinitionHelper(Assembly assembly, string resourceName)
46 {
47 using (Stream resourceStream = assembly.GetManifestResourceStream(resourceName))
48 using (XmlReader reader = XmlReader.Create(resourceStream))
49 {
50 return TableDefinitionCollection.Load(reader);
51 }
52 }
53 }
54#endif
55}
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 @@
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
3namespace WixToolset.Extensibility
4{
5 /// <summary>
6 /// Core facilities for inspector extensions.
7 /// </summary>
8 public interface IInspectorCore
9 {
10 /// <summary>
11 /// Gets whether an error occured.
12 /// </summary>
13 bool EncounteredError { get; }
14 }
15}
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 @@
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
3namespace WixToolset.Extensibility
4{
5 using System;
6 using System.IO;
7 using WixToolset.Data;
8
9 /// <summary>
10 /// Interface for inspector extensions.
11 /// </summary>
12 /// <remarks>
13 /// The inspector methods are stateless, but extensions are loaded once. If you want to maintain state, you should check
14 /// if your data is loaded for each method and, if not, load it.
15 /// </remarks>
16 public interface IInspectorExtension
17 {
18 /// <summary>
19 /// Gets or sets the <see cref="IInspectorCore"/> for inspector extensions to use.
20 /// </summary>
21 IInspectorCore Core { get; set; }
22
23 /// <summary>
24 /// Inspect the source before preprocessing.
25 /// </summary>
26 /// <param name="source">The source to preprocess.</param>
27 void InspectSource(Stream source);
28
29 /// <summary>
30 /// Inspect the compiled output.
31 /// </summary>
32 /// <param name="intermediate">The compiled output.</param>
33 void InspectIntermediate(Intermediate intermediate);
34
35#if REWRITE
36 /// <summary>
37 /// Inspect the output.
38 /// </summary>
39 /// <param name="output">The output. May be called after linking or binding.</param>
40 /// <remarks>
41 /// To inspect a patch's filtered transforms, enumerate <see cref="Output.SubStorages"/>.
42 /// Transforms where the <see cref="SubStorage.Name"/> begins with "#" are
43 /// called patch transforms and instruct Windows Installer how to apply the
44 /// authored transforms - those that do not begin with "#". The authored
45 /// transforms are the primary transforms you'll typically want to inspect
46 /// and contain your changes to target products.
47 /// </remarks>
48#endif
49 /// <summary />
50 void InspectOutput(Intermediate output);
51
52 /// <summary>
53 /// Inspect the final output after binding.
54 /// </summary>
55 /// <param name="filePath">The file path to the final bound output.</param>
56 /// <param name="pdb">The <see cref="Intermediate"/> that contains source line numbers
57 /// for the database and all rows.</param>
58 void InspectDatabase(string filePath, Intermediate pdb);
59 }
60}
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 @@
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
3namespace WixToolset.Extensibility
4{
5 using System;
6 using System.IO;
7 using WixToolset.Data;
8
9#if BRING_THIS_BACK
10 /// <summary>
11 /// Opitonal base class for inspector extensions.
12 /// </summary>
13 public class InspectorExtension : IInspectorExtension
14 {
15 /// <summary>
16 /// Gets the <see cref="InspectorCore"/> for inspector extensions to use.
17 /// </summary>
18 public IInspectorCore Core { get; set; }
19
20 /// <summary>
21 /// Inspect the source before preprocessing.
22 /// </summary>
23 /// <param name="source">The source to preprocess.</param>
24 public virtual void InspectSource(Stream source)
25 {
26 }
27
28 /// <summary>
29 /// Inspect the compiled output.
30 /// </summary>
31 /// <param name="intermediate">The compiled output.</param>
32 public virtual void InspectIntermediate(Intermediate intermediate)
33 {
34 }
35
36 /// <summary>
37 /// Inspect the output.
38 /// </summary>
39 /// <param name="output">The output. May be called after linking or binding.</param>
40 /// <remarks>
41 /// To inspect a patch's filtered transforms, enumerate <see cref="Output.SubStorages"/>.
42 /// Transforms where the <see cref="SubStorage.Name"/> begins with "#" are
43 /// called patch transforms and instruct Windows Installer how to apply the
44 /// authored transforms - those that do not begin with "#". The authored
45 /// transforms are the primary transforms you'll typically want to inspect
46 /// and contain your changes to target products.
47 /// </remarks>
48 public virtual void InspectOutput(Output output)
49 {
50 }
51
52 /// <summary>
53 /// Inspect the final output after binding.
54 /// </summary>
55 /// <param name="filePath">The file path to the final bound output.</param>
56 /// <param name="pdb">The <see cref="Pdb"/> that contains source line numbers
57 /// for the database and all rows.</param>
58 public virtual void InspectDatabase(string filePath, Pdb pdb)
59 {
60 }
61 }
62#endif
63}
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Differ.cs b/src/wix/WixToolset.Core.WindowsInstaller/Differ.cs
index 8b474605..ae9492eb 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Differ.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Differ.cs
@@ -18,7 +18,6 @@ namespace WixToolset.Core.WindowsInstaller
18 /// </summary> 18 /// </summary>
19 public sealed class Differ 19 public sealed class Differ
20 { 20 {
21 private readonly List<IInspectorExtension> inspectorExtensions;
22 private const char sectionDelimiter = '/'; 21 private const char sectionDelimiter = '/';
23 private readonly IMessaging messaging; 22 private readonly IMessaging messaging;
24 private SummaryInformationStreams transformSummaryInfo; 23 private SummaryInformationStreams transformSummaryInfo;
@@ -28,7 +27,6 @@ namespace WixToolset.Core.WindowsInstaller
28 /// </summary> 27 /// </summary>
29 public Differ(IMessaging messaging) 28 public Differ(IMessaging messaging)
30 { 29 {
31 this.inspectorExtensions = new List<IInspectorExtension>();
32 this.messaging = messaging; 30 this.messaging = messaging;
33 } 31 }
34 32
@@ -51,15 +49,6 @@ namespace WixToolset.Core.WindowsInstaller
51 public bool PreserveUnchangedRows { get; set; } 49 public bool PreserveUnchangedRows { get; set; }
52 50
53 /// <summary> 51 /// <summary>
54 /// Adds an extension.
55 /// </summary>
56 /// <param name="extension">The extension to add.</param>
57 public void AddExtension(IInspectorExtension extension)
58 {
59 this.inspectorExtensions.Add(extension);
60 }
61
62 /// <summary>
63 /// Creates a transform by diffing two outputs. 52 /// Creates a transform by diffing two outputs.
64 /// </summary> 53 /// </summary>
65 /// <param name="targetOutput">The target output.</param> 54 /// <param name="targetOutput">The target output.</param>