diff options
| author | Rob Mensching <rob@firegiant.com> | 2019-01-01 00:26:30 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@robmensching.com> | 2019-01-01 09:58:27 -0800 |
| commit | 41622a07f82c57cf3d80393b0b6914f5ccb76e33 (patch) | |
| tree | 8b42a4903f4a98161b44049dd7f73721de6011b0 /src/WixToolset.Core/ExtensibilityServices | |
| parent | e8cb78045d7d03b5014e1e6d781b71165db9b17d (diff) | |
| download | wix-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')
| -rw-r--r-- | src/WixToolset.Core/ExtensibilityServices/TupleDefinitionCreator.cs | 7 |
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 | ||
| 3 | namespace WixToolset.Core.ExtensibilityServices | 3 | namespace 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) |
