diff options
Diffstat (limited to 'src/WixToolset.Core/Linker.cs')
-rw-r--r-- | src/WixToolset.Core/Linker.cs | 52 |
1 files changed, 11 insertions, 41 deletions
diff --git a/src/WixToolset.Core/Linker.cs b/src/WixToolset.Core/Linker.cs index 7faf69ba..c893a01d 100644 --- a/src/WixToolset.Core/Linker.cs +++ b/src/WixToolset.Core/Linker.cs | |||
@@ -56,32 +56,6 @@ namespace WixToolset.Core | |||
56 | //internal IBindVariableResolver WixVariableResolver { get; set; } | 56 | //internal IBindVariableResolver WixVariableResolver { get; set; } |
57 | 57 | ||
58 | /// <summary> | 58 | /// <summary> |
59 | /// Adds an extension. | ||
60 | /// </summary> | ||
61 | /// <param name="extension">The extension to add.</param> | ||
62 | //public void AddExtensionData(IExtensionData extension) | ||
63 | //{ | ||
64 | // if (null != extension.TableDefinitions) | ||
65 | // { | ||
66 | // foreach (TableDefinition tableDefinition in extension.TableDefinitions) | ||
67 | // { | ||
68 | // if (!this.tableDefinitions.Contains(tableDefinition.Name)) | ||
69 | // { | ||
70 | // this.tableDefinitions.Add(tableDefinition); | ||
71 | // } | ||
72 | // else | ||
73 | // { | ||
74 | // throw new WixException(WixErrors.DuplicateExtensionTable(extension.GetType().ToString(), tableDefinition.Name)); | ||
75 | // } | ||
76 | // } | ||
77 | // } | ||
78 | |||
79 | // // keep track of extension data so the libraries can be loaded from these later once all the table definitions | ||
80 | // // are loaded; this will allow extensions to have cross table definition dependencies | ||
81 | // this.extensionData.Add(extension); | ||
82 | //} | ||
83 | |||
84 | /// <summary> | ||
85 | /// Links a collection of sections into an output. | 59 | /// Links a collection of sections into an output. |
86 | /// </summary> | 60 | /// </summary> |
87 | /// <param name="inputs">The collection of sections to link together.</param> | 61 | /// <param name="inputs">The collection of sections to link together.</param> |
@@ -91,10 +65,19 @@ namespace WixToolset.Core | |||
91 | { | 65 | { |
92 | this.Context = context ?? throw new ArgumentNullException(nameof(context)); | 66 | this.Context = context ?? throw new ArgumentNullException(nameof(context)); |
93 | 67 | ||
94 | //IEnumerable<Section> inputs, OutputType expectedOutputType | ||
95 | |||
96 | var sections = this.Context.Intermediates.SelectMany(i => i.Sections).ToList(); | 68 | var sections = this.Context.Intermediates.SelectMany(i => i.Sections).ToList(); |
97 | 69 | ||
70 | // Add sections from the extensions with data. | ||
71 | foreach (var data in context.ExtensionData) | ||
72 | { | ||
73 | var library = data.GetLibrary(context.TupleDefinitionCreator); | ||
74 | |||
75 | if (library != null) | ||
76 | { | ||
77 | sections.AddRange(library.Sections); | ||
78 | } | ||
79 | } | ||
80 | |||
98 | #if MOVE_TO_BACKEND | 81 | #if MOVE_TO_BACKEND |
99 | bool containsModuleSubstitution = false; | 82 | bool containsModuleSubstitution = false; |
100 | bool containsModuleConfiguration = false; | 83 | bool containsModuleConfiguration = false; |
@@ -144,19 +127,6 @@ namespace WixToolset.Core | |||
144 | } | 127 | } |
145 | #endif | 128 | #endif |
146 | 129 | ||
147 | #if TODO | ||
148 | // Add sections from the extensions with data. | ||
149 | foreach (IExtensionData data in this.extensionData) | ||
150 | { | ||
151 | Library library = data.GetLibrary(this.tableDefinitions); | ||
152 | |||
153 | if (null != library) | ||
154 | { | ||
155 | sections.AddRange(library.Sections); | ||
156 | } | ||
157 | } | ||
158 | #endif | ||
159 | |||
160 | // First find the entry section and while processing all sections load all the symbols from all of the sections. | 130 | // First find the entry section and while processing all sections load all the symbols from all of the sections. |
161 | // sections.FindEntrySectionAndLoadSymbols(false, this, expectedOutputType, out entrySection, out allSymbols); | 131 | // sections.FindEntrySectionAndLoadSymbols(false, this, expectedOutputType, out entrySection, out allSymbols); |
162 | var find = new FindEntrySectionAndLoadSymbolsCommand(sections); | 132 | var find = new FindEntrySectionAndLoadSymbolsCommand(sections); |