We need you! We're working hard on the next version of Developer Fusion -
Let us know what you think we should be up to!
-
Expand
Microsoft.Win32
-
Expand
Microsoft.Win32.SafeHandles
-
Expand
System
-
Expand
System.Runtime.Hosting
-
Expand
System.Runtime.InteropServices
-
Expand
System.Runtime.CompilerServices
-
Expand
System.Collections
-
Expand
System.Collections.Generic
-
Expand
System.Collections.ObjectModel
-
Expand
System.Configuration.Assemblies
-
Expand
System.Diagnostics
-
Expand
System.Diagnostics.CodeAnalysis
-
Expand
System.Diagnostics.SymbolStore
-
Expand
System.Globalization
-
Expand
__DateBuffer
-
Expand
BaseInfoTable
-
Expand
BidiCategory
-
Expand
Calendar
-
Expand
CalendarAlgorithmType
-
Expand
CalendarId
-
Expand
CalendarTable
-
Expand
CalendarTableData
-
Expand
CalendarWeekRule
-
Expand
CharUnicodeInfo
-
CharUnicodeInfo()
-
CharUnicodeInfo()
-
GetBidiCategory(string, int)
-
GetDecimalDigitValue(char)
-
GetDecimalDigitValue(string, int)
-
GetDigitValue(char)
-
GetDigitValue(string, int)
-
GetNumericValue(char)
-
GetNumericValue(string, int)
-
GetUnicodeCategory(char)
-
GetUnicodeCategory(string, int)
-
InternalConvertToUtf32(string, int)
-
InternalConvertToUtf32(string, int, int)
-
InternalGetCategoryValue(int, int)
-
InternalGetDecimalDigitValue(int)
-
InternalGetDigitValue(int)
-
InternalGetDigitValues(int)
-
InternalGetNumericValue(int)
-
InternalGetUnicodeCategory(int)
-
InternalGetUnicodeCategory(string, int)
-
InternalGetUnicodeCategory(string, int, int)
-
IsCombiningCategory(UnicodeCategory)
-
IsWhiteSpace(char)
-
IsWhiteSpace(string, int)
-
nativeInitTable(byte)
-
Expand
ChineseLunisolarCalendar
-
Expand
CodePageDataItem
-
Expand
CompareInfo
-
Expand
CompareOptions
-
Expand
CultureData
-
Expand
CultureFlags
-
Expand
CultureInfo
-
Expand
CultureNameOffsetItem
-
Expand
CultureTable
-
Expand
CultureTableData
-
Expand
CultureTableHeader
-
Expand
CultureTableItem
-
Expand
CultureTableRecord
-
Expand
CultureTypes
-
Expand
DateMapping
-
Expand
DateTimeFormatFlags
-
Expand
DateTimeFormatInfo
-
Expand
DateTimeFormatInfoScanner
-
Expand
DateTimeStyles
-
Expand
DaylightTime
-
Expand
DigitShapes
-
Expand
DigitValues
-
Expand
DTFIUserOverrideValues
-
Expand
EastAsianLunisolarCalendar
-
Expand
EncodingTable
-
Expand
EndianessHeader
-
Expand
EraInfo
-
Expand
ExceptionTableItem
-
Expand
FORMATFLAGS
-
Expand
FoundDatePattern
-
Expand
GlobalizationAssembly
-
Expand
GregorianCalendar
-
Expand
GregorianCalendarHelper
-
Expand
GregorianCalendarTypes
-
Expand
HebrewCalendar
-
Expand
HebrewNumber
-
Expand
HebrewNumberParsingContext
-
Expand
HebrewNumberParsingState
-
Expand
HebrewToken
-
Expand
HebrewValue
-
Expand
HijriCalendar
-
Expand
HS
-
Expand
IdnMapping
-
Expand
IDOffsetItem
-
Expand
IetfNameOffsetItem
-
Expand
InternalCodePageDataItem
-
Expand
InternalEncodingDataItem
-
Expand
JapaneseCalendar
-
Expand
JapaneseLunisolarCalendar
-
Expand
JulianCalendar
-
Expand
KoreanCalendar
-
Expand
KoreanLunisolarCalendar
-
Expand
MemoryMapFile
-
Expand
MonthNameStyles
-
Expand
NumberFormatInfo
-
Expand
NumberStyles
-
Expand
PersianCalendar
-
Expand
RegionInfo
-
Expand
RegionNameOffsetItem
-
Expand
SortKey
-
Expand
StringInfo
-
Expand
TaiwanCalendar
-
Expand
TaiwanLunisolarCalendar
-
Expand
TextElementEnumerator
-
Expand
TextInfo
-
Expand
TextInfoDataHeader
-
Expand
ThaiBuddhistCalendar
-
Expand
TokenHashValue
-
Expand
UmAlQuraCalendar
-
Expand
UnicodeCategory
-
Expand
UnicodeDataHeader
-
Expand
System.IO
-
Expand
System.IO.IsolatedStorage
-
Expand
System.Reflection
-
Expand
System.Reflection.Cache
-
Expand
System.Reflection.Emit
-
Expand
System.Resources
-
Expand
System.Runtime
-
Expand
System.Runtime.InteropServices.Expando
-
Expand
System.Runtime.ConstrainedExecution
-
Expand
System.Runtime.Remoting.Activation
-
Expand
System.Runtime.Remoting.Messaging
-
Expand
System.Runtime.Remoting.Channels
-
Expand
System.Runtime.Remoting.Lifetime
-
Expand
System.Runtime.Remoting
-
Expand
System.Runtime.Remoting.Contexts
-
Expand
System.Runtime.Remoting.Proxies
-
Expand
System.Runtime.Remoting.Metadata
-
Expand
System.Runtime.Remoting.Metadata.W3cXsd2001
-
Expand
System.Runtime.Remoting.Services
-
Expand
System.Runtime.Serialization
-
Expand
System.Runtime.Serialization.Formatters
-
Expand
System.Runtime.Serialization.Formatters.Binary
-
Expand
System.Runtime.Versioning
-
Expand
System.Security
-
Expand
System.Security.Cryptography
-
Expand
System.Security.Cryptography.X509Certificates
-
Expand
System.Security.Permissions
-
Expand
System.Security.Policy
-
Expand
System.Security.Principal
-
Expand
System.Security.Util
-
Expand
System.Text
-
Expand
System.Threading
-
Expand
System.Runtime.Remoting.Channels.Http
-
Expand
System.Runtime.Remoting.Channels.Tcp
-
Expand
System.Runtime.Remoting.MetadataServices
-
Expand
System.Runtime.Serialization.Formatters.Soap.Xml
-
Expand
System.Runtime.Serialization.Formatters.Soap
-
Expand
Microsoft.Tools.Caspol
-
Expand
Microsoft.Tools.Build
-
Expand
Microsoft.CSharp
-
Expand
System.CodeDom
-
Expand
System.CodeDom.Compiler
-
Expand
System.Collections.Specialized
-
Expand
System.ComponentModel
-
Expand
System.ComponentModel.Design
-
Expand
System.ComponentModel.Design.Serialization
-
Expand
System.Configuration
-
Expand
System.Web
-
Expand
System.Configuration.Provider
-
Expand
System.Configuration.Internal
-
Expand
System.Internal
-
Expand
System.Windows.Forms
-
Expand
System.Net
-
Expand
System.Net.Sockets
-
Expand
System.Net.NetworkInformation
-
Expand
System.Net.ComImports
-
Expand
System.Net.Security
-
Expand
System.Net.Cache
-
Expand
System.Net.Configuration
-
Expand
System.Text.RegularExpressions
-
Expand
System.Tools
-
Expand
System.IO.Compression
-
Expand
System.IO.Ports
-
Expand
System.Security.AccessControl
-
Expand
System.Xml
-
Expand
System.Xml.XPath.DataBinding
-
Expand
System.Xml.Schema
-
Expand
System.Xml.Serialization
-
Expand
System.Xml.Serialization.Advanced
-
Expand
System.Xml.Serialization.Configuration
-
Expand
System.Xml.XPath
-
Expand
System.Xml.Xsl
-
Expand
System.Xml.Xsl.IlGen
-
Expand
System.Xml.Xsl.Qil
-
Expand
System.Xml.Xsl.Runtime
-
Expand
System.Xml.Xsl.XPath
-
Expand
System.Xml.Xsl.Xslt
-
Expand
System.Xml.Xsl.XsltOld
-
Expand
System.Xml.Xsl.XsltOld.Debugger
-
Expand
Microsoft.JScript
-
Expand
Microsoft.Vsa
-
Expand
Microsoft.JScript.Vsa
- ////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////
- namespace System.Globalization
- {
-
-
-
- using System;
- using System.Threading;
- using System.Runtime.InteropServices;
- using System.Runtime.CompilerServices;
- using System.Reflection;
-
-
-
-
- public sealed class CharUnicodeInfo : object
- {
-
-
-
-
-
-
-
- internal const char HIGH_SURROGATE_START = '�';
- internal const char HIGH_SURROGATE_END = '�';
- internal const char LOW_SURROGATE_START = '�';
- internal const char LOW_SURROGATE_END = '�';
-
- internal const int UNICODE_CATEGORY_OFFSET = 0;
- internal const int BIDI_CATEGORY_OFFSET = 1;
-
-
- unsafe static byte* m_pDataTable;
-
-
- unsafe static ushort* m_pCategoryLevel1Index;
- unsafe static byte* m_pCategoriesValue;
-
-
-
- unsafe static ushort* m_pNumericLevel1Index;
-
-
-
-
-
-
- unsafe static byte* m_pNumericValues;
-
-
-
- unsafe static DigitValues* m_pDigitValues;
-
- internal const string UNICODE_INFO_FILE_NAME = "charinfo.nlp";
-
- internal const int UNICODE_PLANE01_START = 65536;
-
-
-
-
-
-
- [StructLayout(LayoutKind.Explicit)]
- unsafe internal struct UnicodeDataHeader
- {
- [FieldOffset(0)]
- internal char TableName;
-
- [FieldOffset(32)]
- internal ushort version;
-
- [FieldOffset(40)]
- internal uint OffsetToCategoriesIndex;
-
- [FieldOffset(44)]
- internal uint OffsetToCategoriesValue;
-
- [FieldOffset(48)]
- internal uint OffsetToNumbericIndex;
-
- [FieldOffset(52)]
- internal uint OffsetToDigitValue;
-
- [FieldOffset(56)]
- internal uint OffsetToNumbericValue;
-
- }
-
-
-
-
- [StructLayout(LayoutKind.Sequential, Pack = 2)]
- internal struct DigitValues
- {
- internal sbyte decimalDigit;
- internal sbyte digit;
- }
-
-
-
-
-
-
- unsafe static CharUnicodeInfo()
- {
- m_pDataTable = GlobalizationAssembly.GetGlobalizationResourceBytePtr(typeof(CharUnicodeInfo).Assembly, UNICODE_INFO_FILE_NAME);
- UnicodeDataHeader* mainHeader = (UnicodeDataHeader*)m_pDataTable;
-
-
- m_pCategoryLevel1Index = (ushort*)(m_pDataTable + mainHeader->OffsetToCategoriesIndex);
- m_pCategoriesValue = (byte*)(m_pDataTable + mainHeader->OffsetToCategoriesValue);
- m_pNumericLevel1Index = (ushort*)(m_pDataTable + mainHeader->OffsetToNumbericIndex);
- m_pNumericValues = (byte*)(m_pDataTable + mainHeader->OffsetToNumbericValue);
- m_pDigitValues = (DigitValues*)(m_pDataTable + mainHeader->OffsetToDigitValue);
-
-
- nativeInitTable(m_pDataTable);
- }
-
-
- ////////////////////////////////////////////////////////////////////////
-
-
-
- ////////////////////////////////////////////////////////////////////////
- private CharUnicodeInfo()
- {
- }
-
-
- ////////////////////////////////////////////////////////////////////////
-
-
-
-
-
-
-
-
-
- ////////////////////////////////////////////////////////////////////////
-
- static internal int InternalConvertToUtf32(string s, int index)
- {
- BCLDebug.Assert(s != null, "s != null");
- BCLDebug.Assert(index >= 0 && index < s.Length, "index < s.Length");
- if (index < s.Length - 1) {
- int temp1 = (int)s[index] - HIGH_SURROGATE_START;
- if (temp1 >= 0 && temp1 <= 1023) {
- int temp2 = (int)s[index + 1] - LOW_SURROGATE_START;
- if (temp2 >= 0 && temp2 <= 1023) {
-
- return ((temp1 * 1024) + temp2 + UNICODE_PLANE01_START);
- }
- }
- }
- return ((int)s[index]);
- }
-
- ////////////////////////////////////////////////////////////////////////
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ////////////////////////////////////////////////////////////////////////
-
- static internal int InternalConvertToUtf32(string s, int index, out int charLength)
- {
- BCLDebug.Assert(s != null, "s != null");
- BCLDebug.Assert(s.Length > 0, "s.Length > 0");
- BCLDebug.Assert(index >= 0 && index < s.Length, "index >= 0 && index < s.Length");
- charLength = 1;
- if (index < s.Length - 1) {
- int temp1 = (int)s[index] - HIGH_SURROGATE_START;
- if (temp1 >= 0 && temp1 <= 1023) {
- int temp2 = (int)s[index + 1] - LOW_SURROGATE_START;
- if (temp2 >= 0 && temp2 <= 1023) {
-
- charLength++;
- return ((temp1 * 1024) + temp2 + UNICODE_PLANE01_START);
- }
- }
- }
- return ((int)s[index]);
- }
-
- ////////////////////////////////////////////////////////////////////////
-
-
-
-
-
- ////////////////////////////////////////////////////////////////////////
-
- static internal bool IsWhiteSpace(string s, int index)
- {
- BCLDebug.Assert(s != null, "s!=null");
- BCLDebug.Assert(index >= 0 && index < s.Length, "index >= 0 && index < s.Length");
-
- UnicodeCategory uc = GetUnicodeCategory(s, index);
-
-
- switch (uc) {
- case (UnicodeCategory.SpaceSeparator):
- case (UnicodeCategory.LineSeparator):
- case (UnicodeCategory.ParagraphSeparator):
- return (true);
- }
- return (false);
- }
-
-
- static internal bool IsWhiteSpace(char c)
- {
- UnicodeCategory uc = GetUnicodeCategory(c);
-
-
- switch (uc) {
- case (UnicodeCategory.SpaceSeparator):
- case (UnicodeCategory.LineSeparator):
- case (UnicodeCategory.ParagraphSeparator):
- return (true);
- }
-
- return (false);
- }
-
-
-
-
-
-
- unsafe static internal double InternalGetNumericValue(int ch)
- {
- BCLDebug.Assert(ch >= 0 && ch <= 1114111, "ch is not in valid Unicode range.");
-
- ushort index = m_pNumericLevel1Index[ch >> 8];
-
-
-
- index = m_pNumericLevel1Index[index + ((ch >> 4) & 15)];
- byte* pBytePtr = (byte*)&(m_pNumericLevel1Index[index]);
-
- return (((double*)m_pNumericValues)[pBytePtr[(ch & 15)]]);
- }
-
-
-
-
-
-
- unsafe static internal DigitValues* InternalGetDigitValues(int ch)
- {
- BCLDebug.Assert(ch >= 0 && ch <= 1114111, "ch is not in valid Unicode range.");
-
- ushort index = m_pNumericLevel1Index[ch >> 8];
-
-
-
- index = m_pNumericLevel1Index[index + ((ch >> 4) & 15)];
- byte* pBytePtr = (byte*)&(m_pNumericLevel1Index[index]);
-
- return &(m_pDigitValues[pBytePtr[(ch & 15)]]);
- }
-
-
- unsafe static internal sbyte InternalGetDecimalDigitValue(int ch)
- {
- return (InternalGetDigitValues(ch)->decimalDigit);
- }
-
- unsafe static internal sbyte InternalGetDigitValue(int ch)
- {
- return (InternalGetDigitValues(ch)->digit);
- }
-
-
- ////////////////////////////////////////////////////////////////////////
-
-
-
-
-
-
-
-
-
-
-
-
- ////////////////////////////////////////////////////////////////////////
-
-
- public static double GetNumericValue(char ch)
- {
- return (InternalGetNumericValue(ch));
- }
-
-
- public static double GetNumericValue(string s, int index)
- {
- if (s == null) {
- throw new ArgumentNullException("s");
- }
- if (index < 0 || index >= s.Length) {
- throw new ArgumentOutOfRangeException("index", Environment.GetResourceString("ArgumentOutOfRange_Index"));
- }
- return (InternalGetNumericValue(InternalConvertToUtf32(s, index)));
-
- }
-
- ////////////////////////////////////////////////////////////////////////
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ////////////////////////////////////////////////////////////////////////
-
-
- public static int GetDecimalDigitValue(char ch)
- {
- return (InternalGetDecimalDigitValue(ch));
- }
-
-
- public static int GetDecimalDigitValue(string s, int index)
- {
- if (s == null) {
- throw new ArgumentNullException("s");
- }
- if (index < 0 || index >= s.Length) {
- throw new ArgumentOutOfRangeException("index", Environment.GetResourceString("ArgumentOutOfRange_Index"));
- }
-
- return (InternalGetDecimalDigitValue(InternalConvertToUtf32(s, index)));
- }
-
- ////////////////////////////////////////////////////////////////////////
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ////////////////////////////////////////////////////////////////////////
-
-
- public static int GetDigitValue(char ch)
- {
- return (InternalGetDigitValue(ch));
- }
-
-
- public static int GetDigitValue(string s, int index)
- {
- if (s == null) {
- throw new ArgumentNullException("s");
- }
- if (index < 0 || index >= s.Length) {
- throw new ArgumentOutOfRangeException("index", Environment.GetResourceString("ArgumentOutOfRange_Index"));
- }
- return (InternalGetDigitValue(InternalConvertToUtf32(s, index)));
- }
-
- public static UnicodeCategory GetUnicodeCategory(char ch)
- {
- return (InternalGetUnicodeCategory(ch));
- }
-
- public static UnicodeCategory GetUnicodeCategory(string s, int index)
- {
- if (s == null)
- throw new ArgumentNullException("s");
- if (((uint)index) >= ((uint)s.Length)) {
- throw new ArgumentOutOfRangeException("index");
- }
- return InternalGetUnicodeCategory(s, index);
- }
-
- unsafe static internal UnicodeCategory InternalGetUnicodeCategory(int ch)
- {
- return ((UnicodeCategory)InternalGetCategoryValue(ch, UNICODE_CATEGORY_OFFSET));
- }
-
- ////////////////////////////////////////////////////////////////////////
-
-
-
-
-
-
-
-
-
-
-
- ////////////////////////////////////////////////////////////////////////
-
- unsafe static internal byte InternalGetCategoryValue(int ch, int offset)
- {
- BCLDebug.Assert(ch >= 0 && ch <= 1114111, "ch is not in valid Unicode range.");
-
- ushort index = m_pCategoryLevel1Index[ch >> 8];
-
-
- index = m_pCategoryLevel1Index[index + ((ch >> 4) & 15)];
- byte* pBytePtr = (byte*)&(m_pCategoryLevel1Index[index]);
-
- byte valueIndex = pBytePtr[(ch & 15)];
- byte uc = m_pCategoriesValue[valueIndex * 2 + offset];
-
-
-
-
-
- return (uc);
- }
-
-
-
-
-
- static internal BidiCategory GetBidiCategory(string s, int index)
- {
- if (s == null)
- throw new ArgumentNullException("s");
- if (((uint)index) >= ((uint)s.Length)) {
- throw new ArgumentOutOfRangeException("index");
- }
- return ((BidiCategory)InternalGetCategoryValue(InternalConvertToUtf32(s, index), BIDI_CATEGORY_OFFSET));
- }
-
- ////////////////////////////////////////////////////////////////////////
-
-
-
-
-
-
-
-
-
-
- ////////////////////////////////////////////////////////////////////////
-
- static internal UnicodeCategory InternalGetUnicodeCategory(string value, int index)
- {
- BCLDebug.Assert(value != null, "value can not be null");
- BCLDebug.Assert(index < value.Length, "index < value.Length");
-
- return (InternalGetUnicodeCategory(InternalConvertToUtf32(value, index)));
- }
-
- ////////////////////////////////////////////////////////////////////////
-
-
-
-
- ////////////////////////////////////////////////////////////////////////
-
- static internal UnicodeCategory InternalGetUnicodeCategory(string str, int index, out int charLength)
- {
- BCLDebug.Assert(str != null, "str can not be null");
- BCLDebug.Assert(str.Length > 0, "str.Length > 0");
- ;
- BCLDebug.Assert(index >= 0 && index < str.Length, "index >= 0 && index < str.Length");
-
- return (InternalGetUnicodeCategory(InternalConvertToUtf32(str, index, out charLength)));
- }
-
- static internal bool IsCombiningCategory(UnicodeCategory uc)
- {
- BCLDebug.Assert(uc >= 0, "uc >= 0");
- return (uc == UnicodeCategory.NonSpacingMark || uc == UnicodeCategory.SpacingCombiningMark || uc == UnicodeCategory.EnclosingMark);
- }
-
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- unsafe private static extern void nativeInitTable(byte* bytePtr);
-
- }
- }