From 752301ba571020717862d2232e3fad585de6a39a Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 23 Oct 2019 12:53:27 -0700 Subject: Fix custom tables, small fixes in linker and update latest Data --- .../Link/FindEntrySectionAndLoadSymbolsCommand.cs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 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 daf3e878..b9890a3b 100644 --- a/src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs +++ b/src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs @@ -10,20 +10,18 @@ namespace WixToolset.Core.Link internal class FindEntrySectionAndLoadSymbolsCommand { - public FindEntrySectionAndLoadSymbolsCommand(IMessaging messaging, IEnumerable sections) + public FindEntrySectionAndLoadSymbolsCommand(IMessaging messaging, IEnumerable sections, OutputType expectedOutpuType) { this.Messaging = messaging; this.Sections = sections; + this.ExpectedOutputType = expectedOutpuType; } private IMessaging Messaging { get; } private IEnumerable Sections { get; } - /// - /// Sets the expected entry output type, based on output file extension provided to the linker. - /// - public OutputType ExpectedOutputType { private get; set; } + private OutputType ExpectedOutputType { get; } /// /// Gets the located entry section after the command is executed. @@ -42,8 +40,8 @@ namespace WixToolset.Core.Link public void Execute() { - Dictionary symbols = new Dictionary(); - HashSet possibleConflicts = new HashSet(); + var symbols = new Dictionary(); + var possibleConflicts = new HashSet(); if (!Enum.TryParse(this.ExpectedOutputType.ToString(), out SectionType expectedEntrySectionType)) { @@ -74,9 +72,9 @@ namespace WixToolset.Core.Link } // Load all the symbols from the section's tables that create symbols. - foreach (var row in section.Tuples.Where(t => t.Id != null)) + foreach (var tuple in section.Tuples.Where(t => t.Id != null)) { - var symbol = new Symbol(section, row); + var symbol = new Symbol(section, tuple); if (!symbols.TryGetValue(symbol.Name, out var existingSymbol)) { -- cgit v1.2.3-55-g6feb