aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core/ExtensibilityServices/TupleDefinitionCreator.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2019-01-01 00:26:30 -0800
committerRob Mensching <rob@robmensching.com>2019-01-01 09:58:27 -0800
commit41622a07f82c57cf3d80393b0b6914f5ccb76e33 (patch)
tree8b42a4903f4a98161b44049dd7f73721de6011b0 /src/WixToolset.Core/ExtensibilityServices/TupleDefinitionCreator.cs
parente8cb78045d7d03b5014e1e6d781b71165db9b17d (diff)
downloadwix-41622a07f82c57cf3d80393b0b6914f5ccb76e33.tar.gz
wix-41622a07f82c57cf3d80393b0b6914f5ccb76e33.tar.bz2
wix-41622a07f82c57cf3d80393b0b6914f5ccb76e33.zip
Load .wixlib intermediates with single creator
Using a single creator ensures definitions are shared and consistent across the entire build.
Diffstat (limited to 'src/WixToolset.Core/ExtensibilityServices/TupleDefinitionCreator.cs')
-rw-r--r--src/WixToolset.Core/ExtensibilityServices/TupleDefinitionCreator.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/WixToolset.Core/ExtensibilityServices/TupleDefinitionCreator.cs b/src/WixToolset.Core/ExtensibilityServices/TupleDefinitionCreator.cs
index b442da2b..e223e3a4 100644
--- a/src/WixToolset.Core/ExtensibilityServices/TupleDefinitionCreator.cs
+++ b/src/WixToolset.Core/ExtensibilityServices/TupleDefinitionCreator.cs
@@ -1,4 +1,4 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. 1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2 2
3namespace WixToolset.Core.ExtensibilityServices 3namespace WixToolset.Core.ExtensibilityServices
4{ 4{
@@ -23,7 +23,10 @@ namespace WixToolset.Core.ExtensibilityServices
23 23
24 public void AddCustomTupleDefinition(IntermediateTupleDefinition definition) 24 public void AddCustomTupleDefinition(IntermediateTupleDefinition definition)
25 { 25 {
26 this.CustomDefinitionByName.Add(definition.Name, definition); 26 if (!this.CustomDefinitionByName.TryGetValue(definition.Name, out var existing) || definition.Revision > existing.Revision)
27 {
28 this.CustomDefinitionByName[definition.Name] = definition;
29 }
27 } 30 }
28 31
29 public bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition) 32 public bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition)