diff options
Diffstat (limited to 'src/WixToolset.Core/Link/WixComplexReferenceTupleExtensions.cs')
| -rw-r--r-- | src/WixToolset.Core/Link/WixComplexReferenceTupleExtensions.cs | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/WixToolset.Core/Link/WixComplexReferenceTupleExtensions.cs b/src/WixToolset.Core/Link/WixComplexReferenceTupleExtensions.cs index 80cafa50..1702d3ca 100644 --- a/src/WixToolset.Core/Link/WixComplexReferenceTupleExtensions.cs +++ b/src/WixToolset.Core/Link/WixComplexReferenceTupleExtensions.cs | |||
| @@ -3,17 +3,17 @@ | |||
| 3 | namespace WixToolset.Core.Link | 3 | namespace WixToolset.Core.Link |
| 4 | { | 4 | { |
| 5 | using System; | 5 | using System; |
| 6 | using WixToolset.Data.Tuples; | 6 | using WixToolset.Data.Symbols; |
| 7 | 7 | ||
| 8 | internal static class WixComplexReferenceTupleExtensions | 8 | internal static class WixComplexReferenceSymbolExtensions |
| 9 | { | 9 | { |
| 10 | /// <summary> | 10 | /// <summary> |
| 11 | /// Creates a shallow copy of the ComplexReference. | 11 | /// Creates a shallow copy of the ComplexReference. |
| 12 | /// </summary> | 12 | /// </summary> |
| 13 | /// <returns>A shallow copy of the ComplexReference.</returns> | 13 | /// <returns>A shallow copy of the ComplexReference.</returns> |
| 14 | public static WixComplexReferenceTuple Clone(this WixComplexReferenceTuple source) | 14 | public static WixComplexReferenceSymbol Clone(this WixComplexReferenceSymbol source) |
| 15 | { | 15 | { |
| 16 | var clone = new WixComplexReferenceTuple(source.SourceLineNumbers, source.Id); | 16 | var clone = new WixComplexReferenceSymbol(source.SourceLineNumbers, source.Id); |
| 17 | clone.ParentType = source.ParentType; | 17 | clone.ParentType = source.ParentType; |
| 18 | clone.Parent = source.Parent; | 18 | clone.Parent = source.Parent; |
| 19 | clone.ParentLanguage = source.ParentLanguage; | 19 | clone.ParentLanguage = source.ParentLanguage; |
| @@ -29,23 +29,23 @@ namespace WixToolset.Core.Link | |||
| 29 | /// </summary> | 29 | /// </summary> |
| 30 | /// <param name="obj">Complex reference to compare to.</param> | 30 | /// <param name="obj">Complex reference to compare to.</param> |
| 31 | /// <returns>Zero if the objects are equivalent, negative number if the provided object is less, positive if greater.</returns> | 31 | /// <returns>Zero if the objects are equivalent, negative number if the provided object is less, positive if greater.</returns> |
| 32 | public static int CompareToWithoutConsideringPrimary(this WixComplexReferenceTuple tuple, WixComplexReferenceTuple other) | 32 | public static int CompareToWithoutConsideringPrimary(this WixComplexReferenceSymbol symbol, WixComplexReferenceSymbol other) |
| 33 | { | 33 | { |
| 34 | var comparison = tuple.ChildType - other.ChildType; | 34 | var comparison = symbol.ChildType - other.ChildType; |
| 35 | if (0 == comparison) | 35 | if (0 == comparison) |
| 36 | { | 36 | { |
| 37 | comparison = String.Compare(tuple.Child, other.Child, StringComparison.Ordinal); | 37 | comparison = String.Compare(symbol.Child, other.Child, StringComparison.Ordinal); |
| 38 | if (0 == comparison) | 38 | if (0 == comparison) |
| 39 | { | 39 | { |
| 40 | comparison = tuple.ParentType - other.ParentType; | 40 | comparison = symbol.ParentType - other.ParentType; |
| 41 | if (0 == comparison) | 41 | if (0 == comparison) |
| 42 | { | 42 | { |
| 43 | string thisParentLanguage = null == tuple.ParentLanguage ? String.Empty : tuple.ParentLanguage; | 43 | string thisParentLanguage = null == symbol.ParentLanguage ? String.Empty : symbol.ParentLanguage; |
| 44 | string otherParentLanguage = null == other.ParentLanguage ? String.Empty : other.ParentLanguage; | 44 | string otherParentLanguage = null == other.ParentLanguage ? String.Empty : other.ParentLanguage; |
| 45 | comparison = String.Compare(thisParentLanguage, otherParentLanguage, StringComparison.Ordinal); | 45 | comparison = String.Compare(thisParentLanguage, otherParentLanguage, StringComparison.Ordinal); |
| 46 | if (0 == comparison) | 46 | if (0 == comparison) |
| 47 | { | 47 | { |
| 48 | comparison = String.Compare(tuple.Parent, other.Parent, StringComparison.Ordinal); | 48 | comparison = String.Compare(symbol.Parent, other.Parent, StringComparison.Ordinal); |
| 49 | } | 49 | } |
| 50 | } | 50 | } |
| 51 | } | 51 | } |
| @@ -58,15 +58,15 @@ namespace WixToolset.Core.Link | |||
| 58 | /// Changes all of the parent references to point to the passed in parent reference. | 58 | /// Changes all of the parent references to point to the passed in parent reference. |
| 59 | /// </summary> | 59 | /// </summary> |
| 60 | /// <param name="parent">New parent complex reference.</param> | 60 | /// <param name="parent">New parent complex reference.</param> |
| 61 | public static void Reparent(this WixComplexReferenceTuple tuple, WixComplexReferenceTuple parent) | 61 | public static void Reparent(this WixComplexReferenceSymbol symbol, WixComplexReferenceSymbol parent) |
| 62 | { | 62 | { |
| 63 | tuple.Parent = parent.Parent; | 63 | symbol.Parent = parent.Parent; |
| 64 | tuple.ParentLanguage = parent.ParentLanguage; | 64 | symbol.ParentLanguage = parent.ParentLanguage; |
| 65 | tuple.ParentType = parent.ParentType; | 65 | symbol.ParentType = parent.ParentType; |
| 66 | 66 | ||
| 67 | if (!tuple.IsPrimary) | 67 | if (!symbol.IsPrimary) |
| 68 | { | 68 | { |
| 69 | tuple.IsPrimary = parent.IsPrimary; | 69 | symbol.IsPrimary = parent.IsPrimary; |
| 70 | } | 70 | } |
| 71 | } | 71 | } |
| 72 | } | 72 | } |
