diff options
Diffstat (limited to 'src/mscorlib/corefx/System/Globalization/SortVersion.cs')
-rw-r--r-- | src/mscorlib/corefx/System/Globalization/SortVersion.cs | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/mscorlib/corefx/System/Globalization/SortVersion.cs b/src/mscorlib/corefx/System/Globalization/SortVersion.cs index 72aa6d6b7b..983179c149 100644 --- a/src/mscorlib/corefx/System/Globalization/SortVersion.cs +++ b/src/mscorlib/corefx/System/Globalization/SortVersion.cs @@ -5,7 +5,7 @@ using System; using System.Diagnostics.Contracts; -namespace System.Globalization +namespace System.Globalization { [Serializable] public sealed class SortVersion : IEquatable<SortVersion> @@ -13,48 +13,48 @@ namespace System.Globalization private int _nlsVersion; private Guid _sortId; - public int FullVersion + public int FullVersion { - get + get { return _nlsVersion; } } - public Guid SortId + public Guid SortId { - get + get { return _sortId; } } - public SortVersion(int fullVersion, Guid sortId) - { + public SortVersion(int fullVersion, Guid sortId) + { _sortId = sortId; _nlsVersion = fullVersion; } - internal SortVersion(int nlsVersion, int effectiveId, Guid customVersion) + internal SortVersion(int nlsVersion, int effectiveId, Guid customVersion) { _nlsVersion = nlsVersion; - if (customVersion == Guid.Empty) + if (customVersion == Guid.Empty) { - byte b1 = (byte) (effectiveId >> 24); - byte b2 = (byte) ((effectiveId & 0x00FF0000) >> 16); - byte b3 = (byte) ((effectiveId & 0x0000FF00) >> 8); - byte b4 = (byte) (effectiveId & 0xFF); - customVersion = new Guid(0,0,0,0,0,0,0,b1,b2,b3,b4); + byte b1 = (byte)(effectiveId >> 24); + byte b2 = (byte)((effectiveId & 0x00FF0000) >> 16); + byte b3 = (byte)((effectiveId & 0x0000FF00) >> 8); + byte b4 = (byte)(effectiveId & 0xFF); + customVersion = new Guid(0, 0, 0, 0, 0, 0, 0, b1, b2, b3, b4); } _sortId = customVersion; } - public override bool Equals(object obj) + public override bool Equals(object obj) { SortVersion n = obj as SortVersion; - if (n != null) + if (n != null) { return this.Equals(n); } @@ -62,9 +62,9 @@ namespace System.Globalization return false; } - public bool Equals(SortVersion other) + public bool Equals(SortVersion other) { - if (other == null) + if (other == null) { return false; } @@ -72,19 +72,19 @@ namespace System.Globalization return _nlsVersion == other._nlsVersion && _sortId == other._sortId; } - public override int GetHashCode() - { - return _nlsVersion * 7 | _sortId.GetHashCode(); + public override int GetHashCode() + { + return _nlsVersion * 7 | _sortId.GetHashCode(); } - public static bool operator ==(SortVersion left, SortVersion right) + public static bool operator ==(SortVersion left, SortVersion right) { - if (((object) left) != null) + if (((object)left) != null) { return left.Equals(right); } - if (((object) right) != null) + if (((object)right) != null) { return right.Equals(left); } @@ -93,7 +93,7 @@ namespace System.Globalization return true; } - public static bool operator !=(SortVersion left, SortVersion right) + public static bool operator !=(SortVersion left, SortVersion right) { return !(left == right); } |