aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2020-06-24 12:24:20 -0700
committerRob Mensching <rob@firegiant.com>2020-06-25 14:50:31 -0700
commit8968578d50858721317d410549a9f9b5c62bf1f7 (patch)
tree7dc44ae012e6b809b7dda36398d420269d1e4f3b /src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs
parent25602a3e613f09794599d24e0c796d3295a22197 (diff)
downloadwix-8968578d50858721317d410549a9f9b5c62bf1f7.tar.gz
wix-8968578d50858721317d410549a9f9b5c62bf1f7.tar.bz2
wix-8968578d50858721317d410549a9f9b5c62bf1f7.zip
Integrate Symbol to TupleWithSection rename
Diffstat (limited to 'src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs')
-rw-r--r--src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs b/src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs
index b9890a3b..31cbf0b8 100644
--- a/src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs
+++ b/src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs
@@ -31,17 +31,17 @@ namespace WixToolset.Core.Link
31 /// <summary> 31 /// <summary>
32 /// Gets the collection of loaded symbols. 32 /// Gets the collection of loaded symbols.
33 /// </summary> 33 /// </summary>
34 public IDictionary<string, Symbol> Symbols { get; private set; } 34 public IDictionary<string, TupleWithSection> TuplesByName { get; private set; }
35 35
36 /// <summary> 36 /// <summary>
37 /// Gets the collection of possibly conflicting symbols. 37 /// Gets the collection of possibly conflicting symbols.
38 /// </summary> 38 /// </summary>
39 public IEnumerable<Symbol> PossiblyConflictingSymbols { get; private set; } 39 public IEnumerable<TupleWithSection> PossibleConflicts { get; private set; }
40 40
41 public void Execute() 41 public void Execute()
42 { 42 {
43 var symbols = new Dictionary<string, Symbol>(); 43 var tuplesByName = new Dictionary<string, TupleWithSection>();
44 var possibleConflicts = new HashSet<Symbol>(); 44 var possibleConflicts = new HashSet<TupleWithSection>();
45 45
46 if (!Enum.TryParse(this.ExpectedOutputType.ToString(), out SectionType expectedEntrySectionType)) 46 if (!Enum.TryParse(this.ExpectedOutputType.ToString(), out SectionType expectedEntrySectionType))
47 { 47 {
@@ -74,11 +74,11 @@ namespace WixToolset.Core.Link
74 // 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.
75 foreach (var tuple in section.Tuples.Where(t => t.Id != null)) 75 foreach (var tuple in section.Tuples.Where(t => t.Id != null))
76 { 76 {
77 var symbol = new Symbol(section, tuple); 77 var symbol = new TupleWithSection(section, tuple);
78 78
79 if (!symbols.TryGetValue(symbol.Name, out var existingSymbol)) 79 if (!tuplesByName.TryGetValue(symbol.Name, out var existingSymbol))
80 { 80 {
81 symbols.Add(symbol.Name, symbol); 81 tuplesByName.Add(symbol.Name, symbol);
82 } 82 }
83 else // uh-oh, duplicate symbols. 83 else // uh-oh, duplicate symbols.
84 { 84 {
@@ -86,7 +86,7 @@ namespace WixToolset.Core.Link
86 // point to identical tuples. Identical directory tuples are redundant and will not cause 86 // point to identical tuples. Identical directory tuples are redundant and will not cause
87 // conflicts. 87 // conflicts.
88 if (AccessModifier.Private == existingSymbol.Access && AccessModifier.Private == symbol.Access && 88 if (AccessModifier.Private == existingSymbol.Access && AccessModifier.Private == symbol.Access &&
89 TupleDefinitionType.Directory == existingSymbol.Row.Definition.Type && existingSymbol.Row.IsIdentical(symbol.Row)) 89 TupleDefinitionType.Directory == existingSymbol.Tuple.Definition.Type && existingSymbol.Tuple.IsIdentical(symbol.Tuple))
90 { 90 {
91 // Ensure identical symbol's tuple is marked redundant to ensure (should the tuple be 91 // Ensure identical symbol's tuple is marked redundant to ensure (should the tuple be
92 // referenced into the final output) it will not add duplicate primary keys during 92 // referenced into the final output) it will not add duplicate primary keys during
@@ -103,8 +103,8 @@ namespace WixToolset.Core.Link
103 } 103 }
104 } 104 }
105 105
106 this.Symbols = symbols; 106 this.TuplesByName = tuplesByName;
107 this.PossiblyConflictingSymbols = possibleConflicts; 107 this.PossibleConflicts = possibleConflicts;
108 } 108 }
109 } 109 }
110} 110}