From 1eb588c784f65e8459961b03b97005ab223f5172 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Thu, 15 Jun 2017 07:32:54 -0700 Subject: [PATCH] Merge pull request dotnet/corertdotnet/coreclr#3890 from jkotas/nmirror-merge Merge nmirror to master Signed-off-by: dotnet-bot Commit migrated from https://github.com/dotnet/coreclr/commit/dcd16e7fd27fd01309a5e85a20c2d98e0f97a944 --- .../src/mscorlib/shared/System/StringComparer.cs | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/coreclr/src/mscorlib/shared/System/StringComparer.cs b/src/coreclr/src/mscorlib/shared/System/StringComparer.cs index 6990378..ad667ae 100644 --- a/src/coreclr/src/mscorlib/shared/System/StringComparer.cs +++ b/src/coreclr/src/mscorlib/shared/System/StringComparer.cs @@ -173,7 +173,7 @@ namespace System [Serializable] [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] - internal sealed class CultureAwareComparer : StringComparer + public sealed class CultureAwareComparer : StringComparer { private readonly CompareInfo _compareInfo; // Do not rename (binary serialization) private readonly bool _ignoreCase; // Do not rename (binary serialization) @@ -229,7 +229,7 @@ namespace System [Serializable] [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] - internal class OrdinalComparer : StringComparer + public class OrdinalComparer : StringComparer { private readonly bool _ignoreCase; // Do not rename (binary serialization) @@ -277,11 +277,7 @@ namespace System { if (obj == null) { -#if CORECLR ThrowHelper.ThrowArgumentNullException(ExceptionArgument.obj); -#else - throw new ArgumentNullException(nameof(obj)); -#endif } Contract.EndContractBlock(); @@ -326,11 +322,7 @@ namespace System { if (obj == null) { -#if CORECLR ThrowHelper.ThrowArgumentNullException(ExceptionArgument.obj); -#else - throw new ArgumentNullException(nameof(obj)); -#endif } return obj.GetHashCode(); } @@ -342,7 +334,7 @@ namespace System } } - [Serializable] + [Serializable] internal sealed class OrdinalIgnoreCaseComparer : OrdinalComparer, ISerializable { public OrdinalIgnoreCaseComparer() : base(true) @@ -357,11 +349,7 @@ namespace System { if (obj == null) { -#if CORECLR ThrowHelper.ThrowArgumentNullException(ExceptionArgument.obj); -#else - throw new ArgumentNullException(nameof(obj)); -#endif } return TextInfo.GetHashCodeOrdinalIgnoreCase(obj); } -- 2.7.4