diff options
Diffstat (limited to 'src/WixToolset.Core/Linker.cs')
-rw-r--r-- | src/WixToolset.Core/Linker.cs | 178 |
1 files changed, 89 insertions, 89 deletions
diff --git a/src/WixToolset.Core/Linker.cs b/src/WixToolset.Core/Linker.cs index 862681bb..cdefa5c7 100644 --- a/src/WixToolset.Core/Linker.cs +++ b/src/WixToolset.Core/Linker.cs | |||
@@ -10,7 +10,7 @@ namespace WixToolset.Core | |||
10 | using System.Linq; | 10 | using System.Linq; |
11 | using WixToolset.Core.Link; | 11 | using WixToolset.Core.Link; |
12 | using WixToolset.Data; | 12 | using WixToolset.Data; |
13 | using WixToolset.Data.Tuples; | 13 | using WixToolset.Data.Symbols; |
14 | using WixToolset.Data.WindowsInstaller; | 14 | using WixToolset.Data.WindowsInstaller; |
15 | using WixToolset.Extensibility.Data; | 15 | using WixToolset.Extensibility.Data; |
16 | using WixToolset.Extensibility.Services; | 16 | using WixToolset.Extensibility.Services; |
@@ -60,9 +60,9 @@ namespace WixToolset.Core | |||
60 | { | 60 | { |
61 | this.Context = context; | 61 | this.Context = context; |
62 | 62 | ||
63 | if (this.Context.TupleDefinitionCreator == null) | 63 | if (this.Context.SymbolDefinitionCreator == null) |
64 | { | 64 | { |
65 | this.Context.TupleDefinitionCreator = this.ServiceProvider.GetService<ITupleDefinitionCreator>(); | 65 | this.Context.SymbolDefinitionCreator = this.ServiceProvider.GetService<ISymbolDefinitionCreator>(); |
66 | } | 66 | } |
67 | 67 | ||
68 | foreach (var extension in this.Context.Extensions) | 68 | foreach (var extension in this.Context.Extensions) |
@@ -85,7 +85,7 @@ namespace WixToolset.Core | |||
85 | // Add sections from the extensions with data. | 85 | // Add sections from the extensions with data. |
86 | foreach (var data in this.Context.ExtensionData) | 86 | foreach (var data in this.Context.ExtensionData) |
87 | { | 87 | { |
88 | var library = data.GetLibrary(this.Context.TupleDefinitionCreator); | 88 | var library = data.GetLibrary(this.Context.SymbolDefinitionCreator); |
89 | 89 | ||
90 | if (library != null) | 90 | if (library != null) |
91 | { | 91 | { |
@@ -107,7 +107,7 @@ namespace WixToolset.Core | |||
107 | 107 | ||
108 | var multipleFeatureComponents = new Hashtable(); | 108 | var multipleFeatureComponents = new Hashtable(); |
109 | 109 | ||
110 | var wixVariables = new Dictionary<string, WixVariableTuple>(); | 110 | var wixVariables = new Dictionary<string, WixVariableSymbol>(); |
111 | 111 | ||
112 | #if MOVE_TO_BACKEND | 112 | #if MOVE_TO_BACKEND |
113 | // verify that modularization types match for foreign key relationships | 113 | // verify that modularization types match for foreign key relationships |
@@ -149,12 +149,12 @@ namespace WixToolset.Core | |||
149 | throw new WixException(ErrorMessages.MissingEntrySection(this.Context.ExpectedOutputType.ToString())); | 149 | throw new WixException(ErrorMessages.MissingEntrySection(this.Context.ExpectedOutputType.ToString())); |
150 | } | 150 | } |
151 | 151 | ||
152 | // Add the missing standard action tuples. | 152 | // Add the missing standard action symbols. |
153 | this.LoadStandardActions(find.EntrySection, find.TuplesByName); | 153 | this.LoadStandardActions(find.EntrySection, find.SymbolsByName); |
154 | 154 | ||
155 | // Resolve the tuple references to find the set of sections we care about for linking. | 155 | // Resolve the symbol references to find the set of sections we care about for linking. |
156 | // Of course, we start with the entry section (that's how it got its name after all). | 156 | // Of course, we start with the entry section (that's how it got its name after all). |
157 | var resolve = new ResolveReferencesCommand(this.Messaging, find.EntrySection, find.TuplesByName); | 157 | var resolve = new ResolveReferencesCommand(this.Messaging, find.EntrySection, find.SymbolsByName); |
158 | 158 | ||
159 | resolve.Execute(); | 159 | resolve.Execute(); |
160 | 160 | ||
@@ -190,16 +190,16 @@ namespace WixToolset.Core | |||
190 | } | 190 | } |
191 | 191 | ||
192 | // Display an error message for Components that were not referenced by a Feature. | 192 | // Display an error message for Components that were not referenced by a Feature. |
193 | foreach (var tupleWithSection in resolve.ReferencedTupleWithSections.Where(s => s.Tuple.Definition.Type == TupleDefinitionType.Component)) | 193 | foreach (var symbolWithSection in resolve.ReferencedSymbolWithSections.Where(s => s.Symbol.Definition.Type == SymbolDefinitionType.Component)) |
194 | { | 194 | { |
195 | if (!referencedComponents.Contains(tupleWithSection.Name)) | 195 | if (!referencedComponents.Contains(symbolWithSection.Name)) |
196 | { | 196 | { |
197 | this.Messaging.Write(ErrorMessages.OrphanedComponent(tupleWithSection.Tuple.SourceLineNumbers, tupleWithSection.Tuple.Id.Id)); | 197 | this.Messaging.Write(ErrorMessages.OrphanedComponent(symbolWithSection.Symbol.SourceLineNumbers, symbolWithSection.Symbol.Id.Id)); |
198 | } | 198 | } |
199 | } | 199 | } |
200 | 200 | ||
201 | // Report duplicates that would ultimately end up being primary key collisions. | 201 | // Report duplicates that would ultimately end up being primary key collisions. |
202 | var reportDupes = new ReportConflictingTuplesCommand(this.Messaging, find.PossibleConflicts, resolve.ResolvedSections); | 202 | var reportDupes = new ReportConflictingSymbolsCommand(this.Messaging, find.PossibleConflicts, resolve.ResolvedSections); |
203 | reportDupes.Execute(); | 203 | reportDupes.Execute(); |
204 | 204 | ||
205 | if (this.Messaging.EncounteredError) | 205 | if (this.Messaging.EncounteredError) |
@@ -208,7 +208,7 @@ namespace WixToolset.Core | |||
208 | } | 208 | } |
209 | 209 | ||
210 | // resolve the feature to feature connects | 210 | // resolve the feature to feature connects |
211 | this.ResolveFeatureToFeatureConnects(featuresToFeatures, find.TuplesByName); | 211 | this.ResolveFeatureToFeatureConnects(featuresToFeatures, find.SymbolsByName); |
212 | 212 | ||
213 | // Create the section to hold the linked content. | 213 | // Create the section to hold the linked content. |
214 | var resolvedSection = new IntermediateSection(find.EntrySection.Id, find.EntrySection.Type, find.EntrySection.Codepage); | 214 | var resolvedSection = new IntermediateSection(find.EntrySection.Id, find.EntrySection.Type, find.EntrySection.Codepage); |
@@ -225,17 +225,17 @@ namespace WixToolset.Core | |||
225 | sectionId = "wix.section." + sectionCount.ToString(CultureInfo.InvariantCulture); | 225 | sectionId = "wix.section." + sectionCount.ToString(CultureInfo.InvariantCulture); |
226 | } | 226 | } |
227 | 227 | ||
228 | foreach (var tuple in section.Tuples) | 228 | foreach (var symbol in section.Symbols) |
229 | { | 229 | { |
230 | var copyTuple = true; // by default, copy tuples. | 230 | var copySymbol = true; // by default, copy symbols. |
231 | 231 | ||
232 | // handle special tables | 232 | // handle special tables |
233 | switch (tuple.Definition.Type) | 233 | switch (symbol.Definition.Type) |
234 | { | 234 | { |
235 | case TupleDefinitionType.Class: | 235 | case SymbolDefinitionType.Class: |
236 | if (SectionType.Product == resolvedSection.Type) | 236 | if (SectionType.Product == resolvedSection.Type) |
237 | { | 237 | { |
238 | this.ResolveFeatures(tuple, (int)ClassTupleFields.ComponentRef, (int)ClassTupleFields.FeatureRef, componentsToFeatures, multipleFeatureComponents); | 238 | this.ResolveFeatures(symbol, (int)ClassSymbolFields.ComponentRef, (int)ClassSymbolFields.FeatureRef, componentsToFeatures, multipleFeatureComponents); |
239 | } | 239 | } |
240 | break; | 240 | break; |
241 | 241 | ||
@@ -287,48 +287,48 @@ namespace WixToolset.Core | |||
287 | } | 287 | } |
288 | break; | 288 | break; |
289 | #endif | 289 | #endif |
290 | case TupleDefinitionType.Extension: | 290 | case SymbolDefinitionType.Extension: |
291 | if (SectionType.Product == resolvedSection.Type) | 291 | if (SectionType.Product == resolvedSection.Type) |
292 | { | 292 | { |
293 | this.ResolveFeatures(tuple, (int)ExtensionTupleFields.ComponentRef, (int)ExtensionTupleFields.FeatureRef, componentsToFeatures, multipleFeatureComponents); | 293 | this.ResolveFeatures(symbol, (int)ExtensionSymbolFields.ComponentRef, (int)ExtensionSymbolFields.FeatureRef, componentsToFeatures, multipleFeatureComponents); |
294 | } | 294 | } |
295 | break; | 295 | break; |
296 | 296 | ||
297 | #if MOVE_TO_BACKEND | 297 | #if MOVE_TO_BACKEND |
298 | case TupleDefinitionType.ModuleSubstitution: | 298 | case SymbolDefinitionType.ModuleSubstitution: |
299 | containsModuleSubstitution = true; | 299 | containsModuleSubstitution = true; |
300 | break; | 300 | break; |
301 | 301 | ||
302 | case TupleDefinitionType.ModuleConfiguration: | 302 | case SymbolDefinitionType.ModuleConfiguration: |
303 | containsModuleConfiguration = true; | 303 | containsModuleConfiguration = true; |
304 | break; | 304 | break; |
305 | #endif | 305 | #endif |
306 | 306 | ||
307 | case TupleDefinitionType.Assembly: | 307 | case SymbolDefinitionType.Assembly: |
308 | if (SectionType.Product == resolvedSection.Type) | 308 | if (SectionType.Product == resolvedSection.Type) |
309 | { | 309 | { |
310 | this.ResolveFeatures(tuple, (int)AssemblyTupleFields.ComponentRef, (int)AssemblyTupleFields.FeatureRef, componentsToFeatures, multipleFeatureComponents); | 310 | this.ResolveFeatures(symbol, (int)AssemblySymbolFields.ComponentRef, (int)AssemblySymbolFields.FeatureRef, componentsToFeatures, multipleFeatureComponents); |
311 | } | 311 | } |
312 | break; | 312 | break; |
313 | 313 | ||
314 | case TupleDefinitionType.PublishComponent: | 314 | case SymbolDefinitionType.PublishComponent: |
315 | if (SectionType.Product == resolvedSection.Type) | 315 | if (SectionType.Product == resolvedSection.Type) |
316 | { | 316 | { |
317 | this.ResolveFeatures(tuple, (int)PublishComponentTupleFields.ComponentRef, (int)PublishComponentTupleFields.FeatureRef, componentsToFeatures, multipleFeatureComponents); | 317 | this.ResolveFeatures(symbol, (int)PublishComponentSymbolFields.ComponentRef, (int)PublishComponentSymbolFields.FeatureRef, componentsToFeatures, multipleFeatureComponents); |
318 | } | 318 | } |
319 | break; | 319 | break; |
320 | 320 | ||
321 | case TupleDefinitionType.Shortcut: | 321 | case SymbolDefinitionType.Shortcut: |
322 | if (SectionType.Product == resolvedSection.Type) | 322 | if (SectionType.Product == resolvedSection.Type) |
323 | { | 323 | { |
324 | this.ResolveFeatures(tuple, (int)ShortcutTupleFields.ComponentRef, (int)ShortcutTupleFields.Target, componentsToFeatures, multipleFeatureComponents); | 324 | this.ResolveFeatures(symbol, (int)ShortcutSymbolFields.ComponentRef, (int)ShortcutSymbolFields.Target, componentsToFeatures, multipleFeatureComponents); |
325 | } | 325 | } |
326 | break; | 326 | break; |
327 | 327 | ||
328 | case TupleDefinitionType.TypeLib: | 328 | case SymbolDefinitionType.TypeLib: |
329 | if (SectionType.Product == resolvedSection.Type) | 329 | if (SectionType.Product == resolvedSection.Type) |
330 | { | 330 | { |
331 | this.ResolveFeatures(tuple, (int)TypeLibTupleFields.ComponentRef, (int)TypeLibTupleFields.FeatureRef, componentsToFeatures, multipleFeatureComponents); | 331 | this.ResolveFeatures(symbol, (int)TypeLibSymbolFields.ComponentRef, (int)TypeLibSymbolFields.FeatureRef, componentsToFeatures, multipleFeatureComponents); |
332 | } | 332 | } |
333 | break; | 333 | break; |
334 | 334 | ||
@@ -352,51 +352,51 @@ namespace WixToolset.Core | |||
352 | break; | 352 | break; |
353 | #endif | 353 | #endif |
354 | 354 | ||
355 | case TupleDefinitionType.WixMerge: | 355 | case SymbolDefinitionType.WixMerge: |
356 | if (SectionType.Product == resolvedSection.Type) | 356 | if (SectionType.Product == resolvedSection.Type) |
357 | { | 357 | { |
358 | this.ResolveFeatures(tuple, -1, (int)WixMergeTupleFields.FeatureRef, modulesToFeatures, null); | 358 | this.ResolveFeatures(symbol, -1, (int)WixMergeSymbolFields.FeatureRef, modulesToFeatures, null); |
359 | } | 359 | } |
360 | break; | 360 | break; |
361 | 361 | ||
362 | case TupleDefinitionType.WixComplexReference: | 362 | case SymbolDefinitionType.WixComplexReference: |
363 | copyTuple = false; | 363 | copySymbol = false; |
364 | break; | 364 | break; |
365 | 365 | ||
366 | case TupleDefinitionType.WixSimpleReference: | 366 | case SymbolDefinitionType.WixSimpleReference: |
367 | copyTuple = false; | 367 | copySymbol = false; |
368 | break; | 368 | break; |
369 | 369 | ||
370 | case TupleDefinitionType.WixVariable: | 370 | case SymbolDefinitionType.WixVariable: |
371 | // check for colliding values and collect the wix variable rows | 371 | // check for colliding values and collect the wix variable rows |
372 | { | 372 | { |
373 | var wixVariableTuple = (WixVariableTuple)tuple; | 373 | var wixVariableSymbol = (WixVariableSymbol)symbol; |
374 | var id = wixVariableTuple.Id.Id; | 374 | var id = wixVariableSymbol.Id.Id; |
375 | 375 | ||
376 | if (wixVariables.TryGetValue(id, out var collidingTuple)) | 376 | if (wixVariables.TryGetValue(id, out var collidingSymbol)) |
377 | { | 377 | { |
378 | if (collidingTuple.Overridable && !wixVariableTuple.Overridable) | 378 | if (collidingSymbol.Overridable && !wixVariableSymbol.Overridable) |
379 | { | 379 | { |
380 | wixVariables[id] = wixVariableTuple; | 380 | wixVariables[id] = wixVariableSymbol; |
381 | } | 381 | } |
382 | else if (!wixVariableTuple.Overridable || (collidingTuple.Overridable && wixVariableTuple.Overridable)) | 382 | else if (!wixVariableSymbol.Overridable || (collidingSymbol.Overridable && wixVariableSymbol.Overridable)) |
383 | { | 383 | { |
384 | this.Messaging.Write(ErrorMessages.WixVariableCollision(wixVariableTuple.SourceLineNumbers, id)); | 384 | this.Messaging.Write(ErrorMessages.WixVariableCollision(wixVariableSymbol.SourceLineNumbers, id)); |
385 | } | 385 | } |
386 | } | 386 | } |
387 | else | 387 | else |
388 | { | 388 | { |
389 | wixVariables.Add(id, wixVariableTuple); | 389 | wixVariables.Add(id, wixVariableSymbol); |
390 | } | 390 | } |
391 | } | 391 | } |
392 | 392 | ||
393 | copyTuple = false; | 393 | copySymbol = false; |
394 | break; | 394 | break; |
395 | } | 395 | } |
396 | 396 | ||
397 | if (copyTuple) | 397 | if (copySymbol) |
398 | { | 398 | { |
399 | resolvedSection.AddTuple(tuple); | 399 | resolvedSection.AddSymbol(symbol); |
400 | } | 400 | } |
401 | } | 401 | } |
402 | } | 402 | } |
@@ -406,7 +406,7 @@ namespace WixToolset.Core | |||
406 | { | 406 | { |
407 | foreach (var feature in connectToFeature.ConnectFeatures) | 407 | foreach (var feature in connectToFeature.ConnectFeatures) |
408 | { | 408 | { |
409 | resolvedSection.AddTuple(new WixFeatureModulesTuple | 409 | resolvedSection.AddSymbol(new WixFeatureModulesSymbol |
410 | { | 410 | { |
411 | FeatureRef = feature, | 411 | FeatureRef = feature, |
412 | WixMergeRef = connectToFeature.ChildId | 412 | WixMergeRef = connectToFeature.ChildId |
@@ -462,16 +462,16 @@ namespace WixToolset.Core | |||
462 | { | 462 | { |
463 | //var componentSectionIds = new Dictionary<string, string>(); | 463 | //var componentSectionIds = new Dictionary<string, string>(); |
464 | 464 | ||
465 | //foreach (var componentTuple in entrySection.Tuples.OfType<ComponentTuple>()) | 465 | //foreach (var componentSymbol in entrySection.Symbols.OfType<ComponentSymbol>()) |
466 | //{ | 466 | //{ |
467 | // componentSectionIds.Add(componentTuple.Id.Id, componentTuple.SectionId); | 467 | // componentSectionIds.Add(componentSymbol.Id.Id, componentSymbol.SectionId); |
468 | //} | 468 | //} |
469 | 469 | ||
470 | //foreach (var featureComponentTuple in entrySection.Tuples.OfType<FeatureComponentsTuple>()) | 470 | //foreach (var featureComponentSymbol in entrySection.Symbols.OfType<FeatureComponentsSymbol>()) |
471 | //{ | 471 | //{ |
472 | // if (componentSectionIds.TryGetValue(featureComponentTuple.Component_, out var componentSectionId)) | 472 | // if (componentSectionIds.TryGetValue(featureComponentSymbol.Component_, out var componentSectionId)) |
473 | // { | 473 | // { |
474 | // featureComponentTuple.SectionId = componentSectionId; | 474 | // featureComponentSymbol.SectionId = componentSectionId; |
475 | // } | 475 | // } |
476 | //} | 476 | //} |
477 | } | 477 | } |
@@ -544,9 +544,9 @@ namespace WixToolset.Core | |||
544 | #endif | 544 | #endif |
545 | 545 | ||
546 | // copy the wix variable rows to the output after all overriding has been accounted for. | 546 | // copy the wix variable rows to the output after all overriding has been accounted for. |
547 | foreach (var tuple in wixVariables.Values) | 547 | foreach (var symbol in wixVariables.Values) |
548 | { | 548 | { |
549 | resolvedSection.AddTuple(tuple); | 549 | resolvedSection.AddSymbol(symbol); |
550 | } | 550 | } |
551 | 551 | ||
552 | // Bundles have groups of data that must be flattened in a way different from other types. | 552 | // Bundles have groups of data that must be flattened in a way different from other types. |
@@ -734,17 +734,17 @@ namespace WixToolset.Core | |||
734 | /// <summary> | 734 | /// <summary> |
735 | /// Load the standard action symbols. | 735 | /// Load the standard action symbols. |
736 | /// </summary> | 736 | /// </summary> |
737 | /// <param name="tuplesByName">Collection of symbols.</param> | 737 | /// <param name="symbolsByName">Collection of symbols.</param> |
738 | private void LoadStandardActions(IntermediateSection section, IDictionary<string, TupleWithSection> tuplesByName) | 738 | private void LoadStandardActions(IntermediateSection section, IDictionary<string, SymbolWithSection> symbolsByName) |
739 | { | 739 | { |
740 | foreach (var actionTuple in WindowsInstallerStandard.StandardActions()) | 740 | foreach (var actionSymbol in WindowsInstallerStandard.StandardActions()) |
741 | { | 741 | { |
742 | var tupleWithSection = new TupleWithSection(section, actionTuple); | 742 | var symbolWithSection = new SymbolWithSection(section, actionSymbol); |
743 | 743 | ||
744 | // If the action's tuple has not already been defined (i.e. overriden by the user), add it now. | 744 | // If the action's symbol has not already been defined (i.e. overriden by the user), add it now. |
745 | if (!tuplesByName.ContainsKey(tupleWithSection.Name)) | 745 | if (!symbolsByName.ContainsKey(symbolWithSection.Name)) |
746 | { | 746 | { |
747 | tuplesByName.Add(tupleWithSection.Name, tupleWithSection); | 747 | symbolsByName.Add(symbolWithSection.Name, symbolWithSection); |
748 | } | 748 | } |
749 | } | 749 | } |
750 | } | 750 | } |
@@ -752,7 +752,7 @@ namespace WixToolset.Core | |||
752 | /// <summary> | 752 | /// <summary> |
753 | /// Process the complex references. | 753 | /// Process the complex references. |
754 | /// </summary> | 754 | /// </summary> |
755 | /// <param name="resolvedSection">Active section to add tuples to.</param> | 755 | /// <param name="resolvedSection">Active section to add symbols to.</param> |
756 | /// <param name="sections">Sections that are referenced during the link process.</param> | 756 | /// <param name="sections">Sections that are referenced during the link process.</param> |
757 | /// <param name="referencedComponents">Collection of all components referenced by complex reference.</param> | 757 | /// <param name="referencedComponents">Collection of all components referenced by complex reference.</param> |
758 | /// <param name="componentsToFeatures">Component to feature complex references.</param> | 758 | /// <param name="componentsToFeatures">Component to feature complex references.</param> |
@@ -764,8 +764,8 @@ namespace WixToolset.Core | |||
764 | 764 | ||
765 | foreach (var section in sections) | 765 | foreach (var section in sections) |
766 | { | 766 | { |
767 | // Need ToList since we might want to add tuples while processing. | 767 | // Need ToList since we might want to add symbols while processing. |
768 | foreach (var wixComplexReferenceRow in section.Tuples.OfType<WixComplexReferenceTuple>().ToList()) | 768 | foreach (var wixComplexReferenceRow in section.Symbols.OfType<WixComplexReferenceSymbol>().ToList()) |
769 | { | 769 | { |
770 | ConnectToFeature connection; | 770 | ConnectToFeature connection; |
771 | switch (wixComplexReferenceRow.ParentType) | 771 | switch (wixComplexReferenceRow.ParentType) |
@@ -799,7 +799,7 @@ namespace WixToolset.Core | |||
799 | } | 799 | } |
800 | 800 | ||
801 | // add a row to the FeatureComponents table | 801 | // add a row to the FeatureComponents table |
802 | section.AddTuple(new FeatureComponentsTuple | 802 | section.AddSymbol(new FeatureComponentsSymbol |
803 | { | 803 | { |
804 | FeatureRef = wixComplexReferenceRow.Parent, | 804 | FeatureRef = wixComplexReferenceRow.Parent, |
805 | ComponentRef = wixComplexReferenceRow.Child, | 805 | ComponentRef = wixComplexReferenceRow.Child, |
@@ -867,7 +867,7 @@ namespace WixToolset.Core | |||
867 | componentsToModules.Add(wixComplexReferenceRow.Child, wixComplexReferenceRow); // should always be new | 867 | componentsToModules.Add(wixComplexReferenceRow.Child, wixComplexReferenceRow); // should always be new |
868 | 868 | ||
869 | // add a row to the ModuleComponents table | 869 | // add a row to the ModuleComponents table |
870 | section.AddTuple(new ModuleComponentsTuple | 870 | section.AddSymbol(new ModuleComponentsSymbol |
871 | { | 871 | { |
872 | Component = wixComplexReferenceRow.Child, | 872 | Component = wixComplexReferenceRow.Child, |
873 | ModuleID = wixComplexReferenceRow.Parent, | 873 | ModuleID = wixComplexReferenceRow.Parent, |
@@ -931,7 +931,7 @@ namespace WixToolset.Core | |||
931 | /// <param name="sections">Sections that are referenced during the link process.</param> | 931 | /// <param name="sections">Sections that are referenced during the link process.</param> |
932 | private void FlattenSectionsComplexReferences(IEnumerable<IntermediateSection> sections) | 932 | private void FlattenSectionsComplexReferences(IEnumerable<IntermediateSection> sections) |
933 | { | 933 | { |
934 | var parentGroups = new Dictionary<string, List<WixComplexReferenceTuple>>(); | 934 | var parentGroups = new Dictionary<string, List<WixComplexReferenceSymbol>>(); |
935 | var parentGroupsSections = new Dictionary<string, IntermediateSection>(); | 935 | var parentGroupsSections = new Dictionary<string, IntermediateSection>(); |
936 | var parentGroupsNeedingProcessing = new Dictionary<string, IntermediateSection>(); | 936 | var parentGroupsNeedingProcessing = new Dictionary<string, IntermediateSection>(); |
937 | 937 | ||
@@ -945,12 +945,12 @@ namespace WixToolset.Core | |||
945 | foreach (var section in sections) | 945 | foreach (var section in sections) |
946 | { | 946 | { |
947 | // Count down because we'll sometimes remove items from the list. | 947 | // Count down because we'll sometimes remove items from the list. |
948 | for (var i = section.Tuples.Count - 1; i >= 0; --i) | 948 | for (var i = section.Symbols.Count - 1; i >= 0; --i) |
949 | { | 949 | { |
950 | // Only process the "grouping parents" such as FeatureGroup, ComponentGroup, Feature, | 950 | // Only process the "grouping parents" such as FeatureGroup, ComponentGroup, Feature, |
951 | // and Module. Non-grouping complex references are simple and | 951 | // and Module. Non-grouping complex references are simple and |
952 | // resolved during normal complex reference resolutions. | 952 | // resolved during normal complex reference resolutions. |
953 | if (section.Tuples[i] is WixComplexReferenceTuple wixComplexReferenceRow && | 953 | if (section.Symbols[i] is WixComplexReferenceSymbol wixComplexReferenceRow && |
954 | (ComplexReferenceParentType.FeatureGroup == wixComplexReferenceRow.ParentType || | 954 | (ComplexReferenceParentType.FeatureGroup == wixComplexReferenceRow.ParentType || |
955 | ComplexReferenceParentType.ComponentGroup == wixComplexReferenceRow.ParentType || | 955 | ComplexReferenceParentType.ComponentGroup == wixComplexReferenceRow.ParentType || |
956 | ComplexReferenceParentType.Feature == wixComplexReferenceRow.ParentType || | 956 | ComplexReferenceParentType.Feature == wixComplexReferenceRow.ParentType || |
@@ -965,12 +965,12 @@ namespace WixToolset.Core | |||
965 | // Step 2. | 965 | // Step 2. |
966 | if (!parentGroups.TryGetValue(parentTypeAndId, out var childrenComplexRefs)) | 966 | if (!parentGroups.TryGetValue(parentTypeAndId, out var childrenComplexRefs)) |
967 | { | 967 | { |
968 | childrenComplexRefs = new List<WixComplexReferenceTuple>(); | 968 | childrenComplexRefs = new List<WixComplexReferenceSymbol>(); |
969 | parentGroups.Add(parentTypeAndId, childrenComplexRefs); | 969 | parentGroups.Add(parentTypeAndId, childrenComplexRefs); |
970 | } | 970 | } |
971 | 971 | ||
972 | childrenComplexRefs.Add(wixComplexReferenceRow); | 972 | childrenComplexRefs.Add(wixComplexReferenceRow); |
973 | section.Tuples.RemoveAt(i); | 973 | section.Symbols.RemoveAt(i); |
974 | 974 | ||
975 | // Remember the mapping from set of complex references with a common | 975 | // Remember the mapping from set of complex references with a common |
976 | // parent to their section. We'll need this to add them back to the | 976 | // parent to their section. We'll need this to add them back to the |
@@ -1034,7 +1034,7 @@ namespace WixToolset.Core | |||
1034 | (ComplexReferenceParentType.ComponentGroup != wixComplexReferenceRow.ParentType) && | 1034 | (ComplexReferenceParentType.ComponentGroup != wixComplexReferenceRow.ParentType) && |
1035 | (ComplexReferenceParentType.PatchFamilyGroup != wixComplexReferenceRow.ParentType)) | 1035 | (ComplexReferenceParentType.PatchFamilyGroup != wixComplexReferenceRow.ParentType)) |
1036 | { | 1036 | { |
1037 | section.AddTuple(wixComplexReferenceRow); | 1037 | section.AddSymbol(wixComplexReferenceRow); |
1038 | } | 1038 | } |
1039 | } | 1039 | } |
1040 | } | 1040 | } |
@@ -1059,12 +1059,12 @@ namespace WixToolset.Core | |||
1059 | /// <param name="loopDetector">Stack of groups processed thus far. Used to detect loops.</param> | 1059 | /// <param name="loopDetector">Stack of groups processed thus far. Used to detect loops.</param> |
1060 | /// <param name="parentGroups">Hash table of complex references grouped by parent id.</param> | 1060 | /// <param name="parentGroups">Hash table of complex references grouped by parent id.</param> |
1061 | /// <param name="parentGroupsNeedingProcessing">Hash table of parent groups that still have nested groups that need to be flattened.</param> | 1061 | /// <param name="parentGroupsNeedingProcessing">Hash table of parent groups that still have nested groups that need to be flattened.</param> |
1062 | private void FlattenGroup(string parentTypeAndId, Stack<string> loopDetector, Dictionary<string, List<WixComplexReferenceTuple>> parentGroups, Dictionary<string, IntermediateSection> parentGroupsNeedingProcessing) | 1062 | private void FlattenGroup(string parentTypeAndId, Stack<string> loopDetector, Dictionary<string, List<WixComplexReferenceSymbol>> parentGroups, Dictionary<string, IntermediateSection> parentGroupsNeedingProcessing) |
1063 | { | 1063 | { |
1064 | Debug.Assert(parentGroupsNeedingProcessing.ContainsKey(parentTypeAndId)); | 1064 | Debug.Assert(parentGroupsNeedingProcessing.ContainsKey(parentTypeAndId)); |
1065 | loopDetector.Push(parentTypeAndId); // push this complex reference parent identfier into the stack for loop verifying | 1065 | loopDetector.Push(parentTypeAndId); // push this complex reference parent identfier into the stack for loop verifying |
1066 | 1066 | ||
1067 | var allNewChildComplexReferences = new List<WixComplexReferenceTuple>(); | 1067 | var allNewChildComplexReferences = new List<WixComplexReferenceSymbol>(); |
1068 | 1068 | ||
1069 | var referencesToParent = parentGroups[parentTypeAndId]; | 1069 | var referencesToParent = parentGroups[parentTypeAndId]; |
1070 | foreach (var wixComplexReferenceRow in referencesToParent) | 1070 | foreach (var wixComplexReferenceRow in referencesToParent) |
@@ -1158,7 +1158,7 @@ namespace WixToolset.Core | |||
1158 | } | 1158 | } |
1159 | } | 1159 | } |
1160 | 1160 | ||
1161 | int ComplexReferenceComparision(WixComplexReferenceTuple x, WixComplexReferenceTuple y) | 1161 | int ComplexReferenceComparision(WixComplexReferenceSymbol x, WixComplexReferenceSymbol y) |
1162 | { | 1162 | { |
1163 | var comparison = x.ChildType - y.ChildType; | 1163 | var comparison = x.ChildType - y.ChildType; |
1164 | if (0 == comparison) | 1164 | if (0 == comparison) |
@@ -1242,11 +1242,11 @@ namespace WixToolset.Core | |||
1242 | /// </summary> | 1242 | /// </summary> |
1243 | /// <param name="featuresToFeatures">Feature to feature complex references.</param> | 1243 | /// <param name="featuresToFeatures">Feature to feature complex references.</param> |
1244 | /// <param name="allSymbols">All symbols loaded from the sections.</param> | 1244 | /// <param name="allSymbols">All symbols loaded from the sections.</param> |
1245 | private void ResolveFeatureToFeatureConnects(ConnectToFeatureCollection featuresToFeatures, IDictionary<string, TupleWithSection> allSymbols) | 1245 | private void ResolveFeatureToFeatureConnects(ConnectToFeatureCollection featuresToFeatures, IDictionary<string, SymbolWithSection> allSymbols) |
1246 | { | 1246 | { |
1247 | foreach (ConnectToFeature connection in featuresToFeatures) | 1247 | foreach (ConnectToFeature connection in featuresToFeatures) |
1248 | { | 1248 | { |
1249 | var wixSimpleReferenceRow = new WixSimpleReferenceTuple | 1249 | var wixSimpleReferenceRow = new WixSimpleReferenceSymbol |
1250 | { | 1250 | { |
1251 | Table = "Feature", | 1251 | Table = "Feature", |
1252 | PrimaryKeys = connection.ChildId | 1252 | PrimaryKeys = connection.ChildId |
@@ -1254,8 +1254,8 @@ namespace WixToolset.Core | |||
1254 | 1254 | ||
1255 | if (allSymbols.TryGetValue(wixSimpleReferenceRow.SymbolicName, out var symbol)) | 1255 | if (allSymbols.TryGetValue(wixSimpleReferenceRow.SymbolicName, out var symbol)) |
1256 | { | 1256 | { |
1257 | var featureTuple = (FeatureTuple)symbol.Tuple; | 1257 | var featureSymbol = (FeatureSymbol)symbol.Symbol; |
1258 | featureTuple.ParentFeatureRef = connection.PrimaryFeature; | 1258 | featureSymbol.ParentFeatureRef = connection.PrimaryFeature; |
1259 | } | 1259 | } |
1260 | } | 1260 | } |
1261 | } | 1261 | } |
@@ -1308,15 +1308,15 @@ namespace WixToolset.Core | |||
1308 | /// <summary> | 1308 | /// <summary> |
1309 | /// Resolve features for columns that have null guid placeholders. | 1309 | /// Resolve features for columns that have null guid placeholders. |
1310 | /// </summary> | 1310 | /// </summary> |
1311 | /// <param name="tuple">Tuple to resolve.</param> | 1311 | /// <param name="symbol">Symbol to resolve.</param> |
1312 | /// <param name="connectionColumn">Number of the column containing the connection identifier.</param> | 1312 | /// <param name="connectionColumn">Number of the column containing the connection identifier.</param> |
1313 | /// <param name="featureColumn">Number of the column containing the feature.</param> | 1313 | /// <param name="featureColumn">Number of the column containing the feature.</param> |
1314 | /// <param name="connectToFeatures">Connect to feature complex references.</param> | 1314 | /// <param name="connectToFeatures">Connect to feature complex references.</param> |
1315 | /// <param name="multipleFeatureComponents">Hashtable of known components under multiple features.</param> | 1315 | /// <param name="multipleFeatureComponents">Hashtable of known components under multiple features.</param> |
1316 | private void ResolveFeatures(IntermediateTuple tuple, int connectionColumn, int featureColumn, ConnectToFeatureCollection connectToFeatures, Hashtable multipleFeatureComponents) | 1316 | private void ResolveFeatures(IntermediateSymbol symbol, int connectionColumn, int featureColumn, ConnectToFeatureCollection connectToFeatures, Hashtable multipleFeatureComponents) |
1317 | { | 1317 | { |
1318 | var connectionId = connectionColumn < 0 ? tuple.Id.Id : tuple.AsString(connectionColumn); | 1318 | var connectionId = connectionColumn < 0 ? symbol.Id.Id : symbol.AsString(connectionColumn); |
1319 | var featureId = tuple.AsString(featureColumn); | 1319 | var featureId = symbol.AsString(featureColumn); |
1320 | 1320 | ||
1321 | if (EmptyGuid == featureId) | 1321 | if (EmptyGuid == featureId) |
1322 | { | 1322 | { |
@@ -1327,11 +1327,11 @@ namespace WixToolset.Core | |||
1327 | // display an error for the component or merge module as appropriate | 1327 | // display an error for the component or merge module as appropriate |
1328 | if (null != multipleFeatureComponents) | 1328 | if (null != multipleFeatureComponents) |
1329 | { | 1329 | { |
1330 | this.Messaging.Write(ErrorMessages.ComponentExpectedFeature(tuple.SourceLineNumbers, connectionId, tuple.Definition.Name, tuple.Id.Id)); | 1330 | this.Messaging.Write(ErrorMessages.ComponentExpectedFeature(symbol.SourceLineNumbers, connectionId, symbol.Definition.Name, symbol.Id.Id)); |
1331 | } | 1331 | } |
1332 | else | 1332 | else |
1333 | { | 1333 | { |
1334 | this.Messaging.Write(ErrorMessages.MergeModuleExpectedFeature(tuple.SourceLineNumbers, connectionId)); | 1334 | this.Messaging.Write(ErrorMessages.MergeModuleExpectedFeature(symbol.SourceLineNumbers, connectionId)); |
1335 | } | 1335 | } |
1336 | } | 1336 | } |
1337 | else | 1337 | else |
@@ -1359,7 +1359,7 @@ namespace WixToolset.Core | |||
1359 | } | 1359 | } |
1360 | 1360 | ||
1361 | // set the feature | 1361 | // set the feature |
1362 | tuple.Set(featureColumn, connection.PrimaryFeature); | 1362 | symbol.Set(featureColumn, connection.PrimaryFeature); |
1363 | } | 1363 | } |
1364 | } | 1364 | } |
1365 | } | 1365 | } |