diff options
Diffstat (limited to 'src/api')
4 files changed, 0 insertions, 193 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 | |||
3 | namespace 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 | |||
3 | namespace 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 | |||
3 | namespace 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 | |||
3 | namespace 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 | } | ||