This is the more logical namespace for it and it matches the namespace that these live under in CoreRT.
<Compile Include="$(BclSourcesRoot)\System\Globalization\GlobalizationMode.cs" />
</ItemGroup>
<ItemGroup Condition="'$(FeatureCoreFxGlobalization)' != 'true'">
- <Compile Include="$(BclSourcesRoot)\System\Globalization\EncodingDataItem.cs" />
- <Compile Include="$(BclSourcesRoot)\System\Globalization\EncodingTable.cs" />
+ <Compile Include="$(BclSourcesRoot)\System\Text\CodePageDataItem.cs" />
+ <Compile Include="$(BclSourcesRoot)\System\Text\EncodingTable.cs" />
+ </ItemGroup>
+ <ItemGroup Condition="'$(FeatureCoreFxGlobalization)' == 'true'">
+ <Compile Include="$(BclSourcesRoot)\System\Text\CodePageDataItem.Unix.cs" />
+ <Compile Include="$(BclSourcesRoot)\System\Text\EncodingTable.Unix.cs" />
</ItemGroup>
<ItemGroup>
<Compile Include="$(BclSourcesRoot)\System\Threading\SynchronizationContext.cs" />
<Compile Include="$(BclSourcesRoot)\Interop\Unix\Interop.Libraries.cs" />
<Compile Include="$(BclSourcesRoot)\System\Globalization\CompareInfo.Unix.cs" />
<Compile Include="$(BclSourcesRoot)\System\Globalization\CultureInfo.Unix.cs" />
- <Compile Include="$(BclSourcesRoot)\System\Globalization\EncodingTable.Unix.cs" />
- <Compile Include="$(BclSourcesRoot)\System\Globalization\EncodingDataItem.Unix.cs" />
<Compile Include="$(BclSourcesRoot)\System\Globalization\GlobalizationMode.Unix.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\Versioning\CompatibilitySwitch.cs" />
<Compile Include="$(BclSourcesRoot)\System\Threading\ClrThreadPoolBoundHandle.Unix.cs" />
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal static extern int CompareOrdinalHelper(String strA, int indexA, int countA, String strB, int indexB, int countB);
- //This will not work in case-insensitive mode for any character greater than 0x7F.
- //We'll throw an ArgumentException.
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- internal static extern unsafe int nativeCompareOrdinalIgnoreCaseWC(String strA, sbyte* strBBytes);
-
//
//
// NATIVE INSTANCE METHODS
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-namespace System.Globalization
+namespace System.Text
{
internal class CodePageDataItem
{
using System;
using System.Security;
-namespace System.Globalization
+namespace System.Text
{
//
// Data item for EncodingTable. Along with EncodingTable, they are used by
using System.Collections.Generic;
using System.Diagnostics;
+using System.Globalization;
using System.Text;
-namespace System.Globalization
+namespace System.Text
{
internal static class EncodingTable
{
using System.Text;
using System.Collections;
using System.Collections.Generic;
+using System.Globalization;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Threading;
-namespace System.Globalization
+namespace System.Text
{
//
// Data table for encoding classes. Used by System.Text.Encoding.
{
index = ((right - left) / 2) + left;
- result = String.nativeCompareOrdinalIgnoreCaseWC(name, encodingDataPtr[index].webName);
+ result = nativeCompareOrdinalIgnoreCaseWC(name, encodingDataPtr[index].webName);
if (result == 0)
{
//Walk the remaining elements (it'll be 3 or fewer).
for (; left <= right; left++)
{
- if (String.nativeCompareOrdinalIgnoreCaseWC(name, encodingDataPtr[left].webName) == 0)
+ if (nativeCompareOrdinalIgnoreCaseWC(name, encodingDataPtr[left].webName) == 0)
{
return (encodingDataPtr[left].codePage);
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private static extern unsafe InternalCodePageDataItem* GetCodePageData();
+
+ //This will not work in case-insensitive mode for any character greater than 0x7F.
+ //We'll throw an ArgumentException.
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ private static extern unsafe int nativeCompareOrdinalIgnoreCaseWC(String strA, sbyte* strBBytes);
}
/*=================================InternalEncodingDataItem==========================
FCDynamicSig(COR_CTOR_METHOD_NAME, &gsig_IM_PtrSByt_Int_Int_RetVoid, CORINFO_INTRINSIC_Illegal, ECall::CtorSBytePtrStartLengthManaged)
FCDynamicSig(COR_CTOR_METHOD_NAME, &gsig_IM_PtrSByt_Int_Int_Encoding_RetVoid, CORINFO_INTRINSIC_Illegal, ECall::CtorSBytePtrStartLengthEncodingManaged)
FCFuncElement("IsFastSort", COMString::IsFastSort)
- FCFuncElement("nativeCompareOrdinalIgnoreCaseWC", COMString::FCCompareOrdinalIgnoreCaseWC)
FCIntrinsic("get_Length", COMString::Length, CORINFO_INTRINSIC_StringLength)
FCIntrinsic("get_Chars", COMString::GetCharAt, CORINFO_INTRINSIC_StringGetChar)
FCFuncElement("IsAscii", COMString::IsAscii)
FCFuncElement("GetNumEncodingItems", COMNlsInfo::nativeGetNumEncodingItems)
FCFuncElement("GetEncodingData", COMNlsInfo::nativeGetEncodingTableDataPointer)
FCFuncElement("GetCodePageData", COMNlsInfo::nativeGetCodePageTableDataPointer)
+ FCFuncElement("nativeCompareOrdinalIgnoreCaseWC", COMString::FCCompareOrdinalIgnoreCaseWC)
FCFuncEnd()
#endif // !defined(FEATURE_COREFX_GLOBALIZATION)
FCClassElement("Delegate", "System", gDelegateFuncs)
FCClassElement("DependentHandle", "System.Runtime.CompilerServices", gDependentHandleFuncs)
#if !defined(FEATURE_COREFX_GLOBALIZATION)
-FCClassElement("EncodingTable", "System.Globalization", gEncodingTableFuncs)
+FCClassElement("EncodingTable", "System.Text", gEncodingTableFuncs)
#endif // !defined(FEATURE_COREFX_GLOBALIZATION)
FCClassElement("Enum", "System", gEnumFuncs)
FCClassElement("Environment", "System", gEnvironmentFuncs)