From 38afa9e7bc7eacc021f8805f607368a05751e3c3 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 25 Jun 2020 14:43:50 -0700 Subject: The Great Tuple to Symbol Rename (tm) --- .../Link/FindEntrySectionAndLoadSymbolsCommand.cs | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs') diff --git a/src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs b/src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs index 31cbf0b8..1c2ca8eb 100644 --- a/src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs +++ b/src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs @@ -31,17 +31,17 @@ namespace WixToolset.Core.Link /// /// Gets the collection of loaded symbols. /// - public IDictionary TuplesByName { get; private set; } + public IDictionary SymbolsByName { get; private set; } /// /// Gets the collection of possibly conflicting symbols. /// - public IEnumerable PossibleConflicts { get; private set; } + public IEnumerable PossibleConflicts { get; private set; } public void Execute() { - var tuplesByName = new Dictionary(); - var possibleConflicts = new HashSet(); + var symbolsByName = new Dictionary(); + var possibleConflicts = new HashSet(); if (!Enum.TryParse(this.ExpectedOutputType.ToString(), out SectionType expectedEntrySectionType)) { @@ -66,44 +66,44 @@ namespace WixToolset.Core.Link } else { - this.Messaging.Write(ErrorMessages.MultipleEntrySections(this.EntrySection.Tuples.FirstOrDefault()?.SourceLineNumbers, this.EntrySection.Id, section.Id)); - this.Messaging.Write(ErrorMessages.MultipleEntrySections2(section.Tuples.FirstOrDefault()?.SourceLineNumbers)); + this.Messaging.Write(ErrorMessages.MultipleEntrySections(this.EntrySection.Symbols.FirstOrDefault()?.SourceLineNumbers, this.EntrySection.Id, section.Id)); + this.Messaging.Write(ErrorMessages.MultipleEntrySections2(section.Symbols.FirstOrDefault()?.SourceLineNumbers)); } } // Load all the symbols from the section's tables that create symbols. - foreach (var tuple in section.Tuples.Where(t => t.Id != null)) + foreach (var symbol in section.Symbols.Where(t => t.Id != null)) { - var symbol = new TupleWithSection(section, tuple); + var symbolWithSection = new SymbolWithSection(section, symbol); - if (!tuplesByName.TryGetValue(symbol.Name, out var existingSymbol)) + if (!symbolsByName.TryGetValue(symbolWithSection.Name, out var existingSymbol)) { - tuplesByName.Add(symbol.Name, symbol); + symbolsByName.Add(symbolWithSection.Name, symbolWithSection); } else // uh-oh, duplicate symbols. { // If the duplicate symbols are both private directories, there is a chance that they - // point to identical tuples. Identical directory tuples are redundant and will not cause + // point to identical symbols. Identical directory symbols are redundant and will not cause // conflicts. - if (AccessModifier.Private == existingSymbol.Access && AccessModifier.Private == symbol.Access && - TupleDefinitionType.Directory == existingSymbol.Tuple.Definition.Type && existingSymbol.Tuple.IsIdentical(symbol.Tuple)) + if (AccessModifier.Private == existingSymbol.Access && AccessModifier.Private == symbolWithSection.Access && + SymbolDefinitionType.Directory == existingSymbol.Symbol.Definition.Type && existingSymbol.Symbol.IsIdentical(symbolWithSection.Symbol)) { - // Ensure identical symbol's tuple is marked redundant to ensure (should the tuple be + // Ensure identical symbol's symbol is marked redundant to ensure (should the symbol be // referenced into the final output) it will not add duplicate primary keys during // the .IDT importing. //symbol.Row.Redundant = true; - TODO: remove this - existingSymbol.AddRedundant(symbol); + existingSymbol.AddRedundant(symbolWithSection); } else { - existingSymbol.AddPossibleConflict(symbol); + existingSymbol.AddPossibleConflict(symbolWithSection); possibleConflicts.Add(existingSymbol); } } } } - this.TuplesByName = tuplesByName; + this.SymbolsByName = symbolsByName; this.PossibleConflicts = possibleConflicts; } } -- cgit v1.2.3-55-g6feb