diff options
| author | Rob Mensching <rob@firegiant.com> | 2020-06-25 14:47:54 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2020-06-25 14:50:31 -0700 |
| commit | fb2436ef2e5ba9b5c16c7f0fdc948fc6d1faf8b5 (patch) | |
| tree | 6cd8ca9a9c5a459940c36b8b69b89977f0f5e7df /src/WixToolset.Core/Link/IntermediateSymbolExtensions.cs | |
| parent | 38afa9e7bc7eacc021f8805f607368a05751e3c3 (diff) | |
| download | wix-fb2436ef2e5ba9b5c16c7f0fdc948fc6d1faf8b5.tar.gz wix-fb2436ef2e5ba9b5c16c7f0fdc948fc6d1faf8b5.tar.bz2 wix-fb2436ef2e5ba9b5c16c7f0fdc948fc6d1faf8b5.zip | |
The Great Tuple to Symbol File Rename (tm)
Diffstat (limited to 'src/WixToolset.Core/Link/IntermediateSymbolExtensions.cs')
| -rw-r--r-- | src/WixToolset.Core/Link/IntermediateSymbolExtensions.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/WixToolset.Core/Link/IntermediateSymbolExtensions.cs b/src/WixToolset.Core/Link/IntermediateSymbolExtensions.cs new file mode 100644 index 00000000..db53f1ce --- /dev/null +++ b/src/WixToolset.Core/Link/IntermediateSymbolExtensions.cs | |||
| @@ -0,0 +1,26 @@ | |||
| 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 | |||
| 3 | namespace WixToolset.Core.Link | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | |||
| 7 | internal static class IntermediateSymbolExtensions | ||
| 8 | { | ||
| 9 | public static bool IsIdentical(this IntermediateSymbol first, IntermediateSymbol second) | ||
| 10 | { | ||
| 11 | var identical = (first.Definition.Type == second.Definition.Type && | ||
| 12 | first.Definition.Name == second.Definition.Name && | ||
| 13 | first.Definition.FieldDefinitions.Length == second.Definition.FieldDefinitions.Length); | ||
| 14 | |||
| 15 | for (int i = 0; identical && i < first.Definition.FieldDefinitions.Length; ++i) | ||
| 16 | { | ||
| 17 | var firstField = first[i]; | ||
| 18 | var secondField = second[i]; | ||
| 19 | |||
| 20 | identical = (firstField.AsString() == secondField.AsString()); | ||
| 21 | } | ||
| 22 | |||
| 23 | return identical; | ||
| 24 | } | ||
| 25 | } | ||
| 26 | } | ||
