Simplify built-in types across corefx (dotnet/corefxdotnet/coreclr#30656)
authorStephen Toub <stoub@microsoft.com>
Mon, 25 Jun 2018 23:54:41 +0000 (19:54 -0400)
committerJan Kotas <jkotas@microsoft.com>
Wed, 27 Jun 2018 00:22:02 +0000 (17:22 -0700)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/38125912cdde6b8bdf87154139189cf55b235f62

src/libraries/System.Private.CoreLib/src/Interop/Unix/System.Globalization.Native/Interop.Locale.cs
src/libraries/System.Private.CoreLib/src/System/Globalization/CalendarData.Unix.cs
src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.Unix.cs
src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Unix.cs
src/libraries/System.Private.CoreLib/src/System/Globalization/JapaneseCalendar.WinRT.cs

index 9ef41de..b6f5fbe 100644 (file)
@@ -35,6 +35,6 @@ internal static partial class Interop
         internal static extern unsafe bool GetLocaleInfoGroupingSizes(string localeName, uint localeGroupingData, ref int primaryGroupSize, ref int secondaryGroupSize);
 
         [DllImport(Libraries.GlobalizationNative, CharSet = CharSet.Unicode, EntryPoint = "GlobalizationNative_GetLocales")]
-        internal static extern unsafe int GetLocales([Out] Char[] value, int valueLength);
+        internal static extern unsafe int GetLocales([Out] char[] value, int valueLength);
     }
 }
index 1d37926..61e0691 100644 (file)
@@ -32,7 +32,7 @@ namespace System.Globalization
 
     internal partial class CalendarData
     {
-        private bool LoadCalendarDataFromSystem(String localeName, CalendarId calendarId)
+        private bool LoadCalendarDataFromSystem(string localeName, CalendarId calendarId)
         {
             bool result = true;
             result &= GetCalendarInfo(localeName, calendarId, CalendarDataType.NativeName, out this.sNativeName);
index 2c46843..90e9eba 100644 (file)
@@ -722,7 +722,7 @@ namespace System.Globalization
             }
         }
 
-        private unsafe SortKey CreateSortKey(String source, CompareOptions options)
+        private unsafe SortKey CreateSortKey(string source, CompareOptions options)
         {
             Debug.Assert(!_invariantMode);
 
index 933087d..4b21f2e 100644 (file)
@@ -227,19 +227,19 @@ namespace System.Globalization
             return this.GetLocaleInfo(LocaleNumberData.FirstDayOfWeek);
         }
 
-        private String[] GetTimeFormats()
+        private string[] GetTimeFormats()
         {
             string format = GetTimeFormatString(false);
             return new string[] { format };
         }
 
-        private String[] GetShortTimeFormats()
+        private string[] GetShortTimeFormats()
         {
             string format = GetTimeFormatString(true);
             return new string[] { format };
         }
 
-        private static CultureData GetCultureDataFromRegionName(String regionName)
+        private static CultureData GetCultureDataFromRegionName(string regionName)
         {
             // no support to lookup by region name, other than the hard-coded list in CultureData
             return null;
@@ -371,7 +371,7 @@ namespace System.Globalization
                 return Array.Empty<CultureInfo>();
             }
             
-            Char [] chars = new Char[bufferLength];
+            char [] chars = new char[bufferLength];
             
             bufferLength = Interop.Globalization.GetLocales(chars, bufferLength);
             if (bufferLength <= 0)
@@ -394,7 +394,7 @@ namespace System.Globalization
                 int length = (int) chars[index++];
                 if (index + length <= bufferLength)
                 {
-                    CultureInfo ci = CultureInfo.GetCultureInfo(new String(chars, index, length));
+                    CultureInfo ci = CultureInfo.GetCultureInfo(new string(chars, index, length));
                     if ((enumNeutrals && ci.IsNeutralCulture) || (enumSpecificss && !ci.IsNeutralCulture))
                     {
                         list.Add(ci);
index 6a9df97..818cb5b 100644 (file)
@@ -46,7 +46,7 @@ namespace System.Globalization
 
         // PAL Layer ends here
 
-        private static string[] JapaneseErasEnglishNames = new String[] { "M", "T", "S", "H" };
+        private static string[] JapaneseErasEnglishNames = new string[] { "M", "T", "S", "H" };
 
         private static string GetJapaneseEnglishEraName(int era)
         {