aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.WindowsInstaller/Bind/ValidateComponentGuidsCommand.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2020-06-25 14:43:50 -0700
committerRob Mensching <rob@firegiant.com>2020-06-25 14:50:31 -0700
commit38afa9e7bc7eacc021f8805f607368a05751e3c3 (patch)
tree803b0a8d9a06a7d6f7c4df408437017ae21a883e /src/WixToolset.Core.WindowsInstaller/Bind/ValidateComponentGuidsCommand.cs
parent8968578d50858721317d410549a9f9b5c62bf1f7 (diff)
downloadwix-38afa9e7bc7eacc021f8805f607368a05751e3c3.tar.gz
wix-38afa9e7bc7eacc021f8805f607368a05751e3c3.tar.bz2
wix-38afa9e7bc7eacc021f8805f607368a05751e3c3.zip
The Great Tuple to Symbol Rename (tm)
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/ValidateComponentGuidsCommand.cs')
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Bind/ValidateComponentGuidsCommand.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/ValidateComponentGuidsCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/ValidateComponentGuidsCommand.cs
index 020a83fc..5cad9247 100644
--- a/src/WixToolset.Core.WindowsInstaller/Bind/ValidateComponentGuidsCommand.cs
+++ b/src/WixToolset.Core.WindowsInstaller/Bind/ValidateComponentGuidsCommand.cs
@@ -6,7 +6,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
6 using System.Collections.Generic; 6 using System.Collections.Generic;
7 using System.Linq; 7 using System.Linq;
8 using WixToolset.Data; 8 using WixToolset.Data;
9 using WixToolset.Data.Tuples; 9 using WixToolset.Data.Symbols;
10 using WixToolset.Extensibility.Services; 10 using WixToolset.Extensibility.Services;
11 11
12 /// <summary> 12 /// <summary>
@@ -32,30 +32,30 @@ namespace WixToolset.Core.WindowsInstaller.Bind
32 { 32 {
33 var componentGuidConditions = new Dictionary<string, bool>(); 33 var componentGuidConditions = new Dictionary<string, bool>();
34 34
35 foreach (var componentTuple in this.Section.Tuples.OfType<ComponentTuple>()) 35 foreach (var componentSymbol in this.Section.Symbols.OfType<ComponentSymbol>())
36 { 36 {
37 // We don't care about unmanaged components and if there's a * GUID remaining, 37 // We don't care about unmanaged components and if there's a * GUID remaining,
38 // there's already an error that prevented it from being replaced with a real GUID. 38 // there's already an error that prevented it from being replaced with a real GUID.
39 if (!String.IsNullOrEmpty(componentTuple.ComponentId) && "*" != componentTuple.ComponentId) 39 if (!String.IsNullOrEmpty(componentSymbol.ComponentId) && "*" != componentSymbol.ComponentId)
40 { 40 {
41 var thisComponentHasCondition = !String.IsNullOrEmpty(componentTuple.Condition); 41 var thisComponentHasCondition = !String.IsNullOrEmpty(componentSymbol.Condition);
42 var allComponentsHaveConditions = thisComponentHasCondition; 42 var allComponentsHaveConditions = thisComponentHasCondition;
43 43
44 if (componentGuidConditions.TryGetValue(componentTuple.ComponentId, out var alreadyCheckedCondition)) 44 if (componentGuidConditions.TryGetValue(componentSymbol.ComponentId, out var alreadyCheckedCondition))
45 { 45 {
46 allComponentsHaveConditions = thisComponentHasCondition && alreadyCheckedCondition; 46 allComponentsHaveConditions = thisComponentHasCondition && alreadyCheckedCondition;
47 47
48 if (allComponentsHaveConditions) 48 if (allComponentsHaveConditions)
49 { 49 {
50 this.Messaging.Write(WarningMessages.DuplicateComponentGuidsMustHaveMutuallyExclusiveConditions(componentTuple.SourceLineNumbers, componentTuple.Id.Id, componentTuple.ComponentId)); 50 this.Messaging.Write(WarningMessages.DuplicateComponentGuidsMustHaveMutuallyExclusiveConditions(componentSymbol.SourceLineNumbers, componentSymbol.Id.Id, componentSymbol.ComponentId));
51 } 51 }
52 else 52 else
53 { 53 {
54 this.Messaging.Write(ErrorMessages.DuplicateComponentGuids(componentTuple.SourceLineNumbers, componentTuple.Id.Id, componentTuple.ComponentId)); 54 this.Messaging.Write(ErrorMessages.DuplicateComponentGuids(componentSymbol.SourceLineNumbers, componentSymbol.Id.Id, componentSymbol.ComponentId));
55 } 55 }
56 } 56 }
57 57
58 componentGuidConditions[componentTuple.ComponentId] = allComponentsHaveConditions; 58 componentGuidConditions[componentSymbol.ComponentId] = allComponentsHaveConditions;
59 } 59 }
60 } 60 }
61 } 61 }