diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-11-01 10:59:45 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-11-01 10:59:45 -0700 |
| commit | 2bb37beda887d120a0ddabf874ad25357101faa1 (patch) | |
| tree | c35e97b03274b86cfc9ff7fd2caeee211165a140 /src/WixToolset.Core/Link/IntermediateTupleExtensions.cs | |
| parent | df7413aeed3aea3425dff20ae0c8b1be3a3ab525 (diff) | |
| download | wix-2bb37beda887d120a0ddabf874ad25357101faa1.tar.gz wix-2bb37beda887d120a0ddabf874ad25357101faa1.tar.bz2 wix-2bb37beda887d120a0ddabf874ad25357101faa1.zip | |
Update to WiX Intermediate Representation
Diffstat (limited to 'src/WixToolset.Core/Link/IntermediateTupleExtensions.cs')
| -rw-r--r-- | src/WixToolset.Core/Link/IntermediateTupleExtensions.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/WixToolset.Core/Link/IntermediateTupleExtensions.cs b/src/WixToolset.Core/Link/IntermediateTupleExtensions.cs new file mode 100644 index 00000000..c4c12e81 --- /dev/null +++ b/src/WixToolset.Core/Link/IntermediateTupleExtensions.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 IntermediateTupleExtensions | ||
| 8 | { | ||
| 9 | public static bool IsIdentical(this IntermediateTuple first, IntermediateTuple 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 | } | ||
