diff options
author | Tarek Mahmoud Sayed <tarekms@microsoft.com> | 2015-10-27 19:40:14 +0300 |
---|---|---|
committer | Tarek Mahmoud Sayed <tarekms@microsoft.com> | 2015-10-27 21:29:30 +0300 |
commit | 40909e98c1ec9f6cd518bb6faf8763fec2e21438 (patch) | |
tree | 37bf4582084927fcdb6b177bda6fa48b855967e4 /src/System.Private.CoreLib | |
parent | 1ea75a714e81f9f52c18a02193c67103b2ba27d6 (diff) |
Fix the recursion in CultureInfo
The change enable the conditional defines in corelib csproj too
Diffstat (limited to 'src/System.Private.CoreLib')
-rw-r--r-- | src/System.Private.CoreLib/src/System.Private.CoreLib.csproj | 7 | ||||
-rw-r--r-- | src/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs | 12 |
2 files changed, 14 insertions, 5 deletions
diff --git a/src/System.Private.CoreLib/src/System.Private.CoreLib.csproj b/src/System.Private.CoreLib/src/System.Private.CoreLib.csproj index 4ca4bd331..325ed5f79 100644 --- a/src/System.Private.CoreLib/src/System.Private.CoreLib.csproj +++ b/src/System.Private.CoreLib/src/System.Private.CoreLib.csproj @@ -62,9 +62,12 @@ <PropertyGroup> <SkipCommonResourcesIncludes>true</SkipCommonResourcesIncludes> - <!-- TODO: @tarekgh Define this for CoreRT / 64-bit builds only --> + </PropertyGroup> + + <PropertyGroup Condition="'$(IsProjectNLibrary)' != 'true'"> <DefineConstants>CORERT;WIN64</DefineConstants> </PropertyGroup> + <ItemGroup> <Compile Include="..\..\Common\src\System\SR.Core.cs"> <Link>Resources\Common</Link> @@ -482,7 +485,7 @@ <Compile Include="System\Globalization\CultureData.Dummy.cs" /> <Compile Include="System\Globalization\TextInfo.Dummy.cs" /> <Compile Include="System\Globalization\CalendarData.Dummy.cs" /> -</ItemGroup> + </ItemGroup> <ItemGroup> <Compile Include="Internal\Reflection\Tracing\ReflectionTrace.Public.cs" /> diff --git a/src/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs b/src/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs index b96718f90..56984ea63 100644 --- a/src/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs +++ b/src/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs @@ -166,7 +166,14 @@ namespace System.Globalization #if CORERT // CORERT-TODO CultureInfo - m_cultureData = s_InvariantCultureInfo.m_cultureData; + if (s_InvariantCultureInfo == null) + { + m_cultureData = CultureData.GetCultureData("", useUserOverride); + } + else + { + m_cultureData = s_InvariantCultureInfo.m_cultureData; + } m_name = _sortName = _nonSortName = name; m_isInherited = false; #else @@ -278,8 +285,7 @@ namespace System.Globalization { #if CORERT // CORERT-TODO CultureInfo - // https://github.com/dotnet/corert/issues/126 - return null; // return CultureInfo.InvariantCulture; + return CultureInfo.InvariantCulture; #else CultureInfo ci = GetUserDefaultCultureCacheOverride(); if (ci != null) |