aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2019-10-23 12:53:27 -0700
committerRob Mensching <rob@firegiant.com>2019-10-23 12:57:55 -0700
commit752301ba571020717862d2232e3fad585de6a39a (patch)
treea97ceeb6b762af2dd18d0d561dadeaceda3bf387 /src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs
parent11355d03334e300886512411d4649536a5ee65e3 (diff)
downloadwix-752301ba571020717862d2232e3fad585de6a39a.tar.gz
wix-752301ba571020717862d2232e3fad585de6a39a.tar.bz2
wix-752301ba571020717862d2232e3fad585de6a39a.zip
Fix custom tables, small fixes in linker and update latest Data
Diffstat (limited to 'src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs')
-rw-r--r--src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs16
1 files changed, 7 insertions, 9 deletions
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
10 10
11 internal class FindEntrySectionAndLoadSymbolsCommand 11 internal class FindEntrySectionAndLoadSymbolsCommand
12 { 12 {
13 public FindEntrySectionAndLoadSymbolsCommand(IMessaging messaging, IEnumerable<IntermediateSection> sections) 13 public FindEntrySectionAndLoadSymbolsCommand(IMessaging messaging, IEnumerable<IntermediateSection> sections, OutputType expectedOutpuType)
14 { 14 {
15 this.Messaging = messaging; 15 this.Messaging = messaging;
16 this.Sections = sections; 16 this.Sections = sections;
17 this.ExpectedOutputType = expectedOutpuType;
17 } 18 }
18 19
19 private IMessaging Messaging { get; } 20 private IMessaging Messaging { get; }
20 21
21 private IEnumerable<IntermediateSection> Sections { get; } 22 private IEnumerable<IntermediateSection> Sections { get; }
22 23
23 /// <summary> 24 private OutputType ExpectedOutputType { get; }
24 /// Sets the expected entry output type, based on output file extension provided to the linker.
25 /// </summary>
26 public OutputType ExpectedOutputType { private get; set; }
27 25
28 /// <summary> 26 /// <summary>
29 /// Gets the located entry section after the command is executed. 27 /// Gets the located entry section after the command is executed.
@@ -42,8 +40,8 @@ namespace WixToolset.Core.Link
42 40
43 public void Execute() 41 public void Execute()
44 { 42 {
45 Dictionary<string, Symbol> symbols = new Dictionary<string, Symbol>(); 43 var symbols = new Dictionary<string, Symbol>();
46 HashSet<Symbol> possibleConflicts = new HashSet<Symbol>(); 44 var possibleConflicts = new HashSet<Symbol>();
47 45
48 if (!Enum.TryParse(this.ExpectedOutputType.ToString(), out SectionType expectedEntrySectionType)) 46 if (!Enum.TryParse(this.ExpectedOutputType.ToString(), out SectionType expectedEntrySectionType))
49 { 47 {
@@ -74,9 +72,9 @@ namespace WixToolset.Core.Link
74 } 72 }
75 73
76 // Load all the symbols from the section's tables that create symbols. 74 // Load all the symbols from the section's tables that create symbols.
77 foreach (var row in section.Tuples.Where(t => t.Id != null)) 75 foreach (var tuple in section.Tuples.Where(t => t.Id != null))
78 { 76 {
79 var symbol = new Symbol(section, row); 77 var symbol = new Symbol(section, tuple);
80 78
81 if (!symbols.TryGetValue(symbol.Name, out var existingSymbol)) 79 if (!symbols.TryGetValue(symbol.Name, out var existingSymbol))
82 { 80 {