Merge pull request dotnet/corertdotnet/coreclr#3890 from jkotas/nmirror-merge
authorJan Kotas <jkotas@microsoft.com>
Thu, 15 Jun 2017 14:32:54 +0000 (07:32 -0700)
committerJan Kotas <jkotas@microsoft.com>
Thu, 15 Jun 2017 20:11:31 +0000 (13:11 -0700)
Merge nmirror to master

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/dcd16e7fd27fd01309a5e85a20c2d98e0f97a944

src/coreclr/src/mscorlib/shared/System/StringComparer.cs

index 6990378..ad667ae 100644 (file)
@@ -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);
         }