aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data/SimpleTupleDefinitionCreator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Data/SimpleTupleDefinitionCreator.cs')
-rw-r--r--src/WixToolset.Data/SimpleTupleDefinitionCreator.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/WixToolset.Data/SimpleTupleDefinitionCreator.cs b/src/WixToolset.Data/SimpleTupleDefinitionCreator.cs
index 6a86639a..257f028c 100644
--- a/src/WixToolset.Data/SimpleTupleDefinitionCreator.cs
+++ b/src/WixToolset.Data/SimpleTupleDefinitionCreator.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.Data 3namespace WixToolset.Data
4{ 4{
@@ -10,7 +10,10 @@ namespace WixToolset.Data
10 10
11 public void AddCustomTupleDefinition(IntermediateTupleDefinition definition) 11 public void AddCustomTupleDefinition(IntermediateTupleDefinition definition)
12 { 12 {
13 this.CustomDefinitionByName.Add(definition.Name, definition); 13 if (!this.CustomDefinitionByName.TryGetValue(definition.Name, out var existing) || definition.Revision > existing.Revision)
14 {
15 this.CustomDefinitionByName[definition.Name] = definition;
16 }
14 } 17 }
15 18
16 public bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition) 19 public bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition)