aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2017-11-01 10:59:13 -0700
committerRob Mensching <rob@firegiant.com>2017-11-01 10:59:13 -0700
commitf87ec715a88a78a6d7788503da2ebec786544e75 (patch)
tree561573bdd0647c5beec0adb09c2b780ddad2c4c0
parent7efd412cda00b369bc331c9bedd8db971d98fee7 (diff)
downloadwix-f87ec715a88a78a6d7788503da2ebec786544e75.tar.gz
wix-f87ec715a88a78a6d7788503da2ebec786544e75.tar.bz2
wix-f87ec715a88a78a6d7788503da2ebec786544e75.zip
Update to WiX Intermediate Representation
-rw-r--r--src/WixToolset.Extensibility/BinderExtensionBase.cs2
-rw-r--r--src/WixToolset.Extensibility/CompilerExtension.cs5
-rw-r--r--src/WixToolset.Extensibility/DecompilerExtension.cs2
-rw-r--r--src/WixToolset.Extensibility/ExtensionData.cs2
-rw-r--r--src/WixToolset.Extensibility/ExtensionHelper.cs2
-rw-r--r--src/WixToolset.Extensibility/IBackend.cs2
-rw-r--r--src/WixToolset.Extensibility/IBindVariableResolver.cs4
-rw-r--r--src/WixToolset.Extensibility/IBinderCore.cs2
-rw-r--r--src/WixToolset.Extensibility/IBinderExtension.cs2
-rw-r--r--src/WixToolset.Extensibility/IBinderFileManagerCore.cs4
-rw-r--r--src/WixToolset.Extensibility/ICompileContext.cs26
-rw-r--r--src/WixToolset.Extensibility/ICompilerCore.cs2
-rw-r--r--src/WixToolset.Extensibility/ICompilerExtension.cs9
-rw-r--r--src/WixToolset.Extensibility/IDecompilerCore.cs8
-rw-r--r--src/WixToolset.Extensibility/IDecompilerExtension.cs10
-rw-r--r--src/WixToolset.Extensibility/IDelayedField.cs4
-rw-r--r--src/WixToolset.Extensibility/IExtensionData.cs16
-rw-r--r--src/WixToolset.Extensibility/IInspectorExtension.cs4
-rw-r--r--src/WixToolset.Extensibility/ILibrarianExtension.cs2
-rw-r--r--src/WixToolset.Extensibility/ILibraryContext.cs11
-rw-r--r--src/WixToolset.Extensibility/ILinkerExtension.cs23
-rw-r--r--src/WixToolset.Extensibility/IUnbinderExtension.cs2
-rw-r--r--src/WixToolset.Extensibility/IWindowsInstallerBackendExtension.cs4
-rw-r--r--src/WixToolset.Extensibility/InspectorExtension.cs2
-rw-r--r--src/WixToolset.Extensibility/Services/IBindContext.cs2
-rw-r--r--src/WixToolset.Extensibility/Services/ILinkContext.cs21
26 files changed, 133 insertions, 40 deletions
diff --git a/src/WixToolset.Extensibility/BinderExtensionBase.cs b/src/WixToolset.Extensibility/BinderExtensionBase.cs
index a0b34a31..f3f3d63b 100644
--- a/src/WixToolset.Extensibility/BinderExtensionBase.cs
+++ b/src/WixToolset.Extensibility/BinderExtensionBase.cs
@@ -21,7 +21,7 @@ namespace WixToolset.Extensibility
21 /// <summary> 21 /// <summary>
22 /// Called after variable resolution occurs. 22 /// Called after variable resolution occurs.
23 /// </summary> 23 /// </summary>
24 public virtual void AfterResolvedFields(Output output) 24 public virtual void AfterResolvedFields(Intermediate intermediate)
25 { 25 {
26 } 26 }
27 27
diff --git a/src/WixToolset.Extensibility/CompilerExtension.cs b/src/WixToolset.Extensibility/CompilerExtension.cs
index 522ffcf8..d0bb4a10 100644
--- a/src/WixToolset.Extensibility/CompilerExtension.cs
+++ b/src/WixToolset.Extensibility/CompilerExtension.cs
@@ -4,6 +4,7 @@ namespace WixToolset.Extensibility
4{ 4{
5 using System.Collections.Generic; 5 using System.Collections.Generic;
6 using System.Xml.Linq; 6 using System.Xml.Linq;
7 using WixToolset.Data;
7 8
8 /// <summary> 9 /// <summary>
9 /// Base class for creating a compiler extension. 10 /// Base class for creating a compiler extension.
@@ -25,7 +26,7 @@ namespace WixToolset.Extensibility
25 /// <summary> 26 /// <summary>
26 /// Called at the beginning of the compilation of a source file. 27 /// Called at the beginning of the compilation of a source file.
27 /// </summary> 28 /// </summary>
28 public virtual void Initialize() 29 public virtual void PreCompile(ICompileContext context)
29 { 30 {
30 } 31 }
31 32
@@ -67,7 +68,7 @@ namespace WixToolset.Extensibility
67 /// <summary> 68 /// <summary>
68 /// Called at the end of the compilation of a source file. 69 /// Called at the end of the compilation of a source file.
69 /// </summary> 70 /// </summary>
70 public virtual void Finish() 71 public virtual void PostCompile(Intermediate intermediate)
71 { 72 {
72 } 73 }
73 } 74 }
diff --git a/src/WixToolset.Extensibility/DecompilerExtension.cs b/src/WixToolset.Extensibility/DecompilerExtension.cs
index 00277639..b492cf3a 100644
--- a/src/WixToolset.Extensibility/DecompilerExtension.cs
+++ b/src/WixToolset.Extensibility/DecompilerExtension.cs
@@ -4,6 +4,7 @@ namespace WixToolset.Extensibility
4{ 4{
5 using WixToolset.Data; 5 using WixToolset.Data;
6 6
7#if BRING_BACK_LATER
7 /// <summary> 8 /// <summary>
8 /// Base class for creating a decompiler extension. 9 /// Base class for creating a decompiler extension.
9 /// </summary> 10 /// </summary>
@@ -56,4 +57,5 @@ namespace WixToolset.Extensibility
56 { 57 {
57 } 58 }
58 } 59 }
60#endif
59} 61}
diff --git a/src/WixToolset.Extensibility/ExtensionData.cs b/src/WixToolset.Extensibility/ExtensionData.cs
index 4cf262b9..0cd0c420 100644
--- a/src/WixToolset.Extensibility/ExtensionData.cs
+++ b/src/WixToolset.Extensibility/ExtensionData.cs
@@ -8,6 +8,7 @@ namespace WixToolset.Extensibility
8 using System.Xml; 8 using System.Xml;
9 using WixToolset.Data; 9 using WixToolset.Data;
10 10
11#if BRING_BACK_LATER
11 public abstract class ExtensionData : IExtensionData 12 public abstract class ExtensionData : IExtensionData
12 { 13 {
13 /// <summary> 14 /// <summary>
@@ -72,4 +73,5 @@ namespace WixToolset.Extensibility
72 } 73 }
73 } 74 }
74 } 75 }
76#endif
75} 77}
diff --git a/src/WixToolset.Extensibility/ExtensionHelper.cs b/src/WixToolset.Extensibility/ExtensionHelper.cs
index 9c1ca950..6b938a65 100644
--- a/src/WixToolset.Extensibility/ExtensionHelper.cs
+++ b/src/WixToolset.Extensibility/ExtensionHelper.cs
@@ -10,6 +10,7 @@ namespace WixToolset.Extensibility
10 using WixToolset.Data; 10 using WixToolset.Data;
11 using WixToolset.Extensibility; 11 using WixToolset.Extensibility;
12 12
13#if BRING_BACK_LATER
13 /// <summary> 14 /// <summary>
14 /// The main class for a WiX extension. 15 /// The main class for a WiX extension.
15 /// </summary> 16 /// </summary>
@@ -50,4 +51,5 @@ namespace WixToolset.Extensibility
50 } 51 }
51 } 52 }
52 } 53 }
54#endif
53} 55}
diff --git a/src/WixToolset.Extensibility/IBackend.cs b/src/WixToolset.Extensibility/IBackend.cs
index e38de544..9b950364 100644
--- a/src/WixToolset.Extensibility/IBackend.cs
+++ b/src/WixToolset.Extensibility/IBackend.cs
@@ -10,7 +10,7 @@ namespace WixToolset.Extensibility
10 { 10 {
11 BindResult Bind(IBindContext context); 11 BindResult Bind(IBindContext context);
12 12
13 Output Unbind(IUnbindContext context); 13 Intermediate Unbind(IUnbindContext context);
14 14
15 bool Inscribe(IInscribeContext context); 15 bool Inscribe(IInscribeContext context);
16 } 16 }
diff --git a/src/WixToolset.Extensibility/IBindVariableResolver.cs b/src/WixToolset.Extensibility/IBindVariableResolver.cs
index 4c2c3003..f584f327 100644
--- a/src/WixToolset.Extensibility/IBindVariableResolver.cs
+++ b/src/WixToolset.Extensibility/IBindVariableResolver.cs
@@ -3,7 +3,7 @@
3namespace WixToolset.Extensibility 3namespace WixToolset.Extensibility
4{ 4{
5 using WixToolset.Data; 5 using WixToolset.Data;
6 using WixToolset.Data.Rows; 6 using WixToolset.Data.Tuples;
7 7
8 public interface IBindVariableResolver 8 public interface IBindVariableResolver
9 { 9 {
@@ -11,7 +11,7 @@ namespace WixToolset.Extensibility
11 11
12 void AddVariable(string name, string value); 12 void AddVariable(string name, string value);
13 13
14 void AddVariable(WixVariableRow wixVariableRow); 14 void AddVariable(WixVariableTuple wixVariableRow);
15 15
16 string ResolveVariables(SourceLineNumber sourceLineNumbers, string value, bool localizationOnly); 16 string ResolveVariables(SourceLineNumber sourceLineNumbers, string value, bool localizationOnly);
17 17
diff --git a/src/WixToolset.Extensibility/IBinderCore.cs b/src/WixToolset.Extensibility/IBinderCore.cs
index a4044c11..dd3fa3fe 100644
--- a/src/WixToolset.Extensibility/IBinderCore.cs
+++ b/src/WixToolset.Extensibility/IBinderCore.cs
@@ -22,7 +22,7 @@ namespace WixToolset.Extensibility
22 /// Gets the table definitions used by the Binder. 22 /// Gets the table definitions used by the Binder.
23 /// </summary> 23 /// </summary>
24 /// <value>Table definitions used by the binder.</value> 24 /// <value>Table definitions used by the binder.</value>
25 TableDefinitionCollection TableDefinitions { get; } 25 //TableDefinitionCollection TableDefinitions { get; }
26 26
27 /// <summary> 27 /// <summary>
28 /// Generate an identifier by hashing data from the row. 28 /// Generate an identifier by hashing data from the row.
diff --git a/src/WixToolset.Extensibility/IBinderExtension.cs b/src/WixToolset.Extensibility/IBinderExtension.cs
index 9673d60e..0e9df10b 100644
--- a/src/WixToolset.Extensibility/IBinderExtension.cs
+++ b/src/WixToolset.Extensibility/IBinderExtension.cs
@@ -19,7 +19,7 @@ namespace WixToolset.Extensibility
19 /// <summary> 19 /// <summary>
20 /// Called after variable resolution occurs. 20 /// Called after variable resolution occurs.
21 /// </summary> 21 /// </summary>
22 void AfterResolvedFields(Output output); 22 void AfterResolvedFields(Intermediate intermediate);
23 23
24 string ResolveFile(string source, string type, SourceLineNumber sourceLineNumbers, BindStage bindStage); 24 string ResolveFile(string source, string type, SourceLineNumber sourceLineNumbers, BindStage bindStage);
25 25
diff --git a/src/WixToolset.Extensibility/IBinderFileManagerCore.cs b/src/WixToolset.Extensibility/IBinderFileManagerCore.cs
index c6d46e11..b73acb6b 100644
--- a/src/WixToolset.Extensibility/IBinderFileManagerCore.cs
+++ b/src/WixToolset.Extensibility/IBinderFileManagerCore.cs
@@ -18,13 +18,13 @@ namespace WixToolset.Extensibility
18 /// Gets or sets the active subStorage used for binding. 18 /// Gets or sets the active subStorage used for binding.
19 /// </summary> 19 /// </summary>
20 /// <value>The subStorage object.</value> 20 /// <value>The subStorage object.</value>
21 SubStorage ActiveSubStorage { get; } 21 //SubStorage ActiveSubStorage { get; }
22 22
23 /// <summary> 23 /// <summary>
24 /// Gets or sets the output object used for binding. 24 /// Gets or sets the output object used for binding.
25 /// </summary> 25 /// </summary>
26 /// <value>The output object.</value> 26 /// <value>The output object.</value>
27 Output Output { get; } 27 Intermediate Intermediate { get; }
28 28
29 /// <summary> 29 /// <summary>
30 /// Gets or sets the path to the temp files location. 30 /// Gets or sets the path to the temp files location.
diff --git a/src/WixToolset.Extensibility/ICompileContext.cs b/src/WixToolset.Extensibility/ICompileContext.cs
new file mode 100644
index 00000000..d48e9539
--- /dev/null
+++ b/src/WixToolset.Extensibility/ICompileContext.cs
@@ -0,0 +1,26 @@
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.Generic;
7 using System.Xml.Linq;
8 using WixToolset.Data;
9
10 public interface ICompileContext
11 {
12 IServiceProvider ServiceProvider { get; }
13
14 Messaging Messaging { get; set; }
15
16 string CompilationId { get; set; }
17
18 IEnumerable<ICompilerExtension> Extensions { get; set; }
19
20 string OutputPath { get; set; }
21
22 Platform Platform { get; set; }
23
24 XDocument Source { get; set; }
25 }
26}
diff --git a/src/WixToolset.Extensibility/ICompilerCore.cs b/src/WixToolset.Extensibility/ICompilerCore.cs
index b2ad6abd..d71f9cbe 100644
--- a/src/WixToolset.Extensibility/ICompilerCore.cs
+++ b/src/WixToolset.Extensibility/ICompilerCore.cs
@@ -62,7 +62,7 @@ namespace WixToolset.Extensibility
62 /// <param name="tableName">Name of table to create row in.</param> 62 /// <param name="tableName">Name of table to create row in.</param>
63 /// <param name="identifier">Optional identifier for the row.</param> 63 /// <param name="identifier">Optional identifier for the row.</param>
64 /// <returns>New row.</returns> 64 /// <returns>New row.</returns>
65 Row CreateRow(SourceLineNumber sourceLineNumbers, string tableName, Identifier identifier = null); 65 IntermediateTuple CreateRow(SourceLineNumber sourceLineNumbers, string tableName, Identifier identifier = null);
66 66
67 /// <summary> 67 /// <summary>
68 /// Creates directories using the inline directory syntax. 68 /// Creates directories using the inline directory syntax.
diff --git a/src/WixToolset.Extensibility/ICompilerExtension.cs b/src/WixToolset.Extensibility/ICompilerExtension.cs
index edd7aa15..1746a571 100644
--- a/src/WixToolset.Extensibility/ICompilerExtension.cs
+++ b/src/WixToolset.Extensibility/ICompilerExtension.cs
@@ -4,18 +4,21 @@ namespace WixToolset.Extensibility
4{ 4{
5 using System.Collections.Generic; 5 using System.Collections.Generic;
6 using System.Xml.Linq; 6 using System.Xml.Linq;
7 using WixToolset.Data;
8 using WixToolset.Extensibility.Services;
7 9
8 /// <summary> 10 /// <summary>
9 /// Interface all compiler extensions implement. 11 /// Interface all compiler extensions implement.
10 /// </summary> 12 /// </summary>
11 public interface ICompilerExtension 13 public interface ICompilerExtension
12 { 14 {
15#if false
13 /// <summary> 16 /// <summary>
14 /// Gets or sets the compiler core for the extension. 17 /// Gets or sets the compiler core for the extension.
15 /// </summary> 18 /// </summary>
16 /// <value>Compiler core for the extension.</value> 19 /// <value>Compiler core for the extension.</value>
17 ICompilerCore Core { get; set; } 20 ICompilerCore Core { get; set; }
18 21#endif
19 /// <summary> 22 /// <summary>
20 /// Gets the schema namespace for this extension. 23 /// Gets the schema namespace for this extension.
21 /// </summary> 24 /// </summary>
@@ -25,7 +28,7 @@ namespace WixToolset.Extensibility
25 /// <summary> 28 /// <summary>
26 /// Called at the beginning of the compilation of a source file. 29 /// Called at the beginning of the compilation of a source file.
27 /// </summary> 30 /// </summary>
28 void Initialize(); 31 void PreCompile(ICompileContext context);
29 32
30 /// <summary> 33 /// <summary>
31 /// Processes an attribute for the Compiler. 34 /// Processes an attribute for the Compiler.
@@ -54,6 +57,6 @@ namespace WixToolset.Extensibility
54 /// <summary> 57 /// <summary>
55 /// Called at the end of the compilation of a source file. 58 /// Called at the end of the compilation of a source file.
56 /// </summary> 59 /// </summary>
57 void Finish(); 60 void PostCompile(Intermediate intermediate);
58 } 61 }
59} 62}
diff --git a/src/WixToolset.Extensibility/IDecompilerCore.cs b/src/WixToolset.Extensibility/IDecompilerCore.cs
index d18d5170..1c367e0c 100644
--- a/src/WixToolset.Extensibility/IDecompilerCore.cs
+++ b/src/WixToolset.Extensibility/IDecompilerCore.cs
@@ -47,7 +47,7 @@ namespace WixToolset.Extensibility
47 /// </summary> 47 /// </summary>
48 /// <param name="row">The row corresponding to the element.</param> 48 /// <param name="row">The row corresponding to the element.</param>
49 /// <returns>The indexed element.</returns> 49 /// <returns>The indexed element.</returns>
50 Wix.ISchemaElement GetIndexedElement(Row row); 50 Wix.ISchemaElement GetIndexedElement(IntermediateTuple row);
51 51
52 /// <summary> 52 /// <summary>
53 /// Gets the element corresponding to the primary key of the given table. 53 /// Gets the element corresponding to the primary key of the given table.
@@ -62,12 +62,12 @@ namespace WixToolset.Extensibility
62 /// </summary> 62 /// </summary>
63 /// <param name="row">The row corresponding to the element.</param> 63 /// <param name="row">The row corresponding to the element.</param>
64 /// <param name="element">The element to index.</param> 64 /// <param name="element">The element to index.</param>
65 void IndexElement(Row row, Wix.ISchemaElement element); 65 void IndexElement(IntermediateTuple row, Wix.ISchemaElement element);
66 66
67 /// <summary> 67 /// <summary>
68 /// Indicates the decompiler encountered and unexpected table to decompile. 68 /// Indicates the decompiler encountered and unexpected table to decompile.
69 /// </summary> 69 /// </summary>
70 /// <param name="table">Unknown decompiled table.</param> 70 /// <param name="table">Unknown decompiled table.</param>
71 void UnexpectedTable(Table table); 71 void UnexpectedTable(string table);
72} 72}
73} 73}
diff --git a/src/WixToolset.Extensibility/IDecompilerExtension.cs b/src/WixToolset.Extensibility/IDecompilerExtension.cs
index 6124f348..1574f964 100644
--- a/src/WixToolset.Extensibility/IDecompilerExtension.cs
+++ b/src/WixToolset.Extensibility/IDecompilerExtension.cs
@@ -19,31 +19,31 @@ namespace WixToolset.Extensibility
19 /// Gets the table definitions this extension decompiles. 19 /// Gets the table definitions this extension decompiles.
20 /// </summary> 20 /// </summary>
21 /// <value>Table definitions this extension decompiles.</value> 21 /// <value>Table definitions this extension decompiles.</value>
22 TableDefinitionCollection TableDefinitions { get; } 22 //TableDefinitionCollection TableDefinitions { get; }
23 23
24 /// <summary> 24 /// <summary>
25 /// Gets the library that this decompiler wants removed from the decomipiled output. 25 /// Gets the library that this decompiler wants removed from the decomipiled output.
26 /// </summary> 26 /// </summary>
27 /// <param name="tableDefinitions">The table definitions to use while loading the library.</param> 27 /// <param name="tableDefinitions">The table definitions to use while loading the library.</param>
28 /// <returns>The library for this extension or null if there is no library to be removed.</returns> 28 /// <returns>The library for this extension or null if there is no library to be removed.</returns>
29 Library GetLibraryToRemove(TableDefinitionCollection tableDefinitions); 29 //Library GetLibraryToRemove(TableDefinitionCollection tableDefinitions);
30 30
31 /// <summary> 31 /// <summary>
32 /// Called at the beginning of the decompilation of a database. 32 /// Called at the beginning of the decompilation of a database.
33 /// </summary> 33 /// </summary>
34 /// <param name="tables">The collection of all tables.</param> 34 /// <param name="tables">The collection of all tables.</param>
35 void Initialize(TableIndexedCollection tables); 35 //void Initialize(TableIndexedCollection tables);
36 36
37 /// <summary> 37 /// <summary>
38 /// Decompiles an extension table. 38 /// Decompiles an extension table.
39 /// </summary> 39 /// </summary>
40 /// <param name="table">The table to decompile.</param> 40 /// <param name="table">The table to decompile.</param>
41 void DecompileTable(Table table); 41 //void DecompileTable(Table table);
42 42
43 /// <summary> 43 /// <summary>
44 /// Finalize decompilation. 44 /// Finalize decompilation.
45 /// </summary> 45 /// </summary>
46 /// <param name="tables">The collection of all tables.</param> 46 /// <param name="tables">The collection of all tables.</param>
47 void Finish(TableIndexedCollection tables); 47 //void Finish(TableIndexedCollection tables);
48 } 48 }
49} 49}
diff --git a/src/WixToolset.Extensibility/IDelayedField.cs b/src/WixToolset.Extensibility/IDelayedField.cs
index a6cc7a2e..e06dbe59 100644
--- a/src/WixToolset.Extensibility/IDelayedField.cs
+++ b/src/WixToolset.Extensibility/IDelayedField.cs
@@ -6,8 +6,8 @@ namespace WixToolset.Extensibility
6 6
7 public interface IDelayedField 7 public interface IDelayedField
8 { 8 {
9 Field Field { get; } 9 IntermediateField Field { get; }
10 10
11 Row Row { get; } 11 IntermediateTuple Row { get; }
12 } 12 }
13} \ No newline at end of file 13} \ No newline at end of file
diff --git a/src/WixToolset.Extensibility/IExtensionData.cs b/src/WixToolset.Extensibility/IExtensionData.cs
index 19e23590..f0e339d4 100644
--- a/src/WixToolset.Extensibility/IExtensionData.cs
+++ b/src/WixToolset.Extensibility/IExtensionData.cs
@@ -10,22 +10,24 @@ namespace WixToolset.Extensibility
10 public interface IExtensionData 10 public interface IExtensionData
11 { 11 {
12 /// <summary> 12 /// <summary>
13 /// Gets the table definitions for this extension.
14 /// </summary>
15 /// <value>Table definisions for this extension or null if there are no table definitions.</value>
16 TableDefinitionCollection TableDefinitions { get; }
17
18 /// <summary>
19 /// Gets the optional default culture. 13 /// Gets the optional default culture.
20 /// </summary> 14 /// </summary>
21 /// <value>The optional default culture.</value> 15 /// <value>The optional default culture.</value>
22 string DefaultCulture { get; } 16 string DefaultCulture { get; }
23 17
24 /// <summary> 18 /// <summary>
19 ///
20 /// </summary>
21 /// <param name="name"></param>
22 /// <param name="tupleDefinition"></param>
23 /// <returns>True </returns>
24 bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition);
25
26 /// <summary>
25 /// Gets the library associated with this extension. 27 /// Gets the library associated with this extension.
26 /// </summary> 28 /// </summary>
27 /// <param name="tableDefinitions">The table definitions to use while loading the library.</param> 29 /// <param name="tableDefinitions">The table definitions to use while loading the library.</param>
28 /// <returns>The library for this extension or null if there is no library.</returns> 30 /// <returns>The library for this extension or null if there is no library.</returns>
29 Library GetLibrary(TableDefinitionCollection tableDefinitions); 31 Library GetLibrary(ITupleDefinitionCreator tupleDefinitions);
30 } 32 }
31} 33}
diff --git a/src/WixToolset.Extensibility/IInspectorExtension.cs b/src/WixToolset.Extensibility/IInspectorExtension.cs
index b2a098b7..6c4be1e5 100644
--- a/src/WixToolset.Extensibility/IInspectorExtension.cs
+++ b/src/WixToolset.Extensibility/IInspectorExtension.cs
@@ -46,7 +46,7 @@ namespace WixToolset.Extensibility
46 /// transforms are the primary transforms you'll typically want to inspect 46 /// transforms are the primary transforms you'll typically want to inspect
47 /// and contain your changes to target products. 47 /// and contain your changes to target products.
48 /// </remarks> 48 /// </remarks>
49 void InspectOutput(Output output); 49 void InspectOutput(Intermediate output);
50 50
51 /// <summary> 51 /// <summary>
52 /// Inspect the final output after binding. 52 /// Inspect the final output after binding.
@@ -54,6 +54,6 @@ namespace WixToolset.Extensibility
54 /// <param name="filePath">The file path to the final bound output.</param> 54 /// <param name="filePath">The file path to the final bound output.</param>
55 /// <param name="pdb">The <see cref="Pdb"/> that contains source line numbers 55 /// <param name="pdb">The <see cref="Pdb"/> that contains source line numbers
56 /// for the database and all rows.</param> 56 /// for the database and all rows.</param>
57 void InspectDatabase(string filePath, Pdb pdb); 57 void InspectDatabase(string filePath, Intermediate pdb);
58 } 58 }
59} 59}
diff --git a/src/WixToolset.Extensibility/ILibrarianExtension.cs b/src/WixToolset.Extensibility/ILibrarianExtension.cs
index 08d37607..ae4529d8 100644
--- a/src/WixToolset.Extensibility/ILibrarianExtension.cs
+++ b/src/WixToolset.Extensibility/ILibrarianExtension.cs
@@ -10,6 +10,6 @@ namespace WixToolset.Extensibility
10 10
11 string Resolve(SourceLineNumber sourceLineNumber, string table, string path); 11 string Resolve(SourceLineNumber sourceLineNumber, string table, string path);
12 12
13 void PostCombine(Library library); 13 void PostCombine(Intermediate library);
14 } 14 }
15} 15}
diff --git a/src/WixToolset.Extensibility/ILibraryContext.cs b/src/WixToolset.Extensibility/ILibraryContext.cs
index 4e13696b..b8c1887a 100644
--- a/src/WixToolset.Extensibility/ILibraryContext.cs
+++ b/src/WixToolset.Extensibility/ILibraryContext.cs
@@ -2,18 +2,27 @@
2 2
3namespace WixToolset.Extensibility 3namespace WixToolset.Extensibility
4{ 4{
5 using System;
5 using System.Collections.Generic; 6 using System.Collections.Generic;
6 using WixToolset.Data; 7 using WixToolset.Data;
7 8
8 public interface ILibraryContext 9 public interface ILibraryContext
9 { 10 {
11 IServiceProvider ServiceProvider { get; }
12
13 Messaging Messaging { get; set; }
14
10 bool BindFiles { get; set; } 15 bool BindFiles { get; set; }
11 16
17 IEnumerable<BindPath> BindPaths { get; set; }
18
12 IEnumerable<ILibrarianExtension> Extensions { get; set; } 19 IEnumerable<ILibrarianExtension> Extensions { get; set; }
13 20
21 string LibraryId { get; set; }
22
14 IEnumerable<Localization> Localizations { get; set; } 23 IEnumerable<Localization> Localizations { get; set; }
15 24
16 IEnumerable<Section> Sections { get; set; } 25 IEnumerable<Intermediate> Intermediates { get; set; }
17 26
18 IBindVariableResolver WixVariableResolver { get; set; } 27 IBindVariableResolver WixVariableResolver { get; set; }
19 } 28 }
diff --git a/src/WixToolset.Extensibility/ILinkerExtension.cs b/src/WixToolset.Extensibility/ILinkerExtension.cs
new file mode 100644
index 00000000..cb82720a
--- /dev/null
+++ b/src/WixToolset.Extensibility/ILinkerExtension.cs
@@ -0,0 +1,23 @@
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 WixToolset.Data;
6 using WixToolset.Extensibility.Services;
7
8 /// <summary>
9 /// Interface all binder extensions implement.
10 /// </summary>
11 public interface ILinkerExtension
12 {
13 /// <summary>
14 /// Called before linking occurs.
15 /// </summary>
16 void PreLink(ILinkContext context);
17
18 /// <summary>
19 /// Called after all linking occurs.
20 /// </summary>
21 void PostLink(Intermediate intermediate);
22 }
23}
diff --git a/src/WixToolset.Extensibility/IUnbinderExtension.cs b/src/WixToolset.Extensibility/IUnbinderExtension.cs
index 88bf20d9..0e9a2504 100644
--- a/src/WixToolset.Extensibility/IUnbinderExtension.cs
+++ b/src/WixToolset.Extensibility/IUnbinderExtension.cs
@@ -13,6 +13,6 @@ namespace WixToolset.Extensibility
13 /// <summary> 13 /// <summary>
14 /// Called during the generation of sectionIds for an admin image. 14 /// Called during the generation of sectionIds for an admin image.
15 /// </summary> 15 /// </summary>
16 void GenerateSectionIds(Output output); 16 void GenerateSectionIds(Intermediate output);
17 } 17 }
18} 18}
diff --git a/src/WixToolset.Extensibility/IWindowsInstallerBackendExtension.cs b/src/WixToolset.Extensibility/IWindowsInstallerBackendExtension.cs
index 3b01cc0d..f6ffc69c 100644
--- a/src/WixToolset.Extensibility/IWindowsInstallerBackendExtension.cs
+++ b/src/WixToolset.Extensibility/IWindowsInstallerBackendExtension.cs
@@ -3,8 +3,8 @@
3namespace WixToolset.Extensibility 3namespace WixToolset.Extensibility
4{ 4{
5 using System.Collections.Generic; 5 using System.Collections.Generic;
6 using WixToolset.Data.Rows;
7 using WixToolset.Data.Bind; 6 using WixToolset.Data.Bind;
7 using WixToolset.Data.Tuples;
8 using WixToolset.Extensibility.Services; 8 using WixToolset.Extensibility.Services;
9 9
10 /// <summary> 10 /// <summary>
@@ -19,7 +19,7 @@ namespace WixToolset.Extensibility
19 19
20 ResolvedCabinet ResolveCabinet(string cabinetPath, IEnumerable<BindFileWithPath> files); 20 ResolvedCabinet ResolveCabinet(string cabinetPath, IEnumerable<BindFileWithPath> files);
21 21
22 string ResolveMedia(MediaRow mediaRow, string mediaLayoutDirectory, string layoutDirectory); 22 string ResolveMedia(MediaTuple mediaRow, string mediaLayoutDirectory, string layoutDirectory);
23 23
24 /// <summary> 24 /// <summary>
25 /// Called after all output changes occur and right before the output is bound into its final format. 25 /// Called after all output changes occur and right before the output is bound into its final format.
diff --git a/src/WixToolset.Extensibility/InspectorExtension.cs b/src/WixToolset.Extensibility/InspectorExtension.cs
index 82b1ef02..49c3f9de 100644
--- a/src/WixToolset.Extensibility/InspectorExtension.cs
+++ b/src/WixToolset.Extensibility/InspectorExtension.cs
@@ -6,6 +6,7 @@ namespace WixToolset.Extensibility
6 using System.IO; 6 using System.IO;
7 using WixToolset.Data; 7 using WixToolset.Data;
8 8
9#if BRING_THIS_BACK
9 /// <summary> 10 /// <summary>
10 /// Opitonal base class for inspector extensions. 11 /// Opitonal base class for inspector extensions.
11 /// </summary> 12 /// </summary>
@@ -58,4 +59,5 @@ namespace WixToolset.Extensibility
58 { 59 {
59 } 60 }
60 } 61 }
62#endif
61} 63}
diff --git a/src/WixToolset.Extensibility/Services/IBindContext.cs b/src/WixToolset.Extensibility/Services/IBindContext.cs
index ce78709b..6bed0ef6 100644
--- a/src/WixToolset.Extensibility/Services/IBindContext.cs
+++ b/src/WixToolset.Extensibility/Services/IBindContext.cs
@@ -34,7 +34,7 @@ namespace WixToolset.Extensibility.Services
34 34
35 string IntermediateFolder { get; set; } 35 string IntermediateFolder { get; set; }
36 36
37 Output IntermediateRepresentation { get; set; } 37 Intermediate IntermediateRepresentation { get; set; }
38 38
39 string OutputPath { get; set; } 39 string OutputPath { get; set; }
40 40
diff --git a/src/WixToolset.Extensibility/Services/ILinkContext.cs b/src/WixToolset.Extensibility/Services/ILinkContext.cs
new file mode 100644
index 00000000..8c5b3c65
--- /dev/null
+++ b/src/WixToolset.Extensibility/Services/ILinkContext.cs
@@ -0,0 +1,21 @@
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.Services
4{
5 using System;
6 using System.Collections.Generic;
7 using WixToolset.Data;
8
9 public interface ILinkContext
10 {
11 IServiceProvider ServiceProvider { get; }
12
13 Messaging Messaging { get; set; }
14
15 IEnumerable<ILinkerExtension> Extensions { get; set; }
16
17 OutputType ExpectedOutputType { get; set; }
18
19 IEnumerable<Intermediate> Intermediates { get; set; }
20 }
21}