Fix the Collation name returned from CompareInfo.Name and TextInfo.Name
authorTarekm Mahmoud Sayed <tarekms@microsoft.com>
Fri, 23 Sep 2016 22:05:27 +0000 (15:05 -0700)
committerTarekm Mahmoud Sayed <tarekms@microsoft.com>
Fri, 23 Sep 2016 22:05:27 +0000 (15:05 -0700)
this was a regression #7004 and caused the issue #1139

src/mscorlib/corefx/System/Globalization/CultureData.cs

index eb71318..b2043d1 100644 (file)
@@ -1667,8 +1667,8 @@ namespace System.Globalization
             {
                 // Note: Custom cultures might point at another culture's textinfo, however windows knows how
                 // to redirect it to the desired textinfo culture, so this is OK.
-                Contract.Assert(_sWindowsName != null, "[CultureData.STEXTINFO] Expected _sWindowsName to be populated by already");
-                return (_sWindowsName);
+                Contract.Assert(_sRealName != null, "[CultureData.STEXTINFO] Expected _sRealName to be populated by already");
+                return (_sRealName);
             }
         }
 
@@ -1677,8 +1677,8 @@ namespace System.Globalization
         {
             get
             {
-                Contract.Assert(_sWindowsName != null, "[CultureData.SCOMPAREINFO] Expected _sWindowsName to be populated by already");
-                return (_sWindowsName);
+                Contract.Assert(_sRealName != null, "[CultureData.SCOMPAREINFO] Expected _sRealName to be populated by already");
+                return (_sRealName);
             }
         }