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
-
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
-
AddDateWordOrPostfix(string, string)
-
AddDateWords(string, int, string)
-
AddIgnorableSymbols(string)
-
ArrayElementsBeginWithDigit(string)
-
ArrayElementsHaveSpace(string)
-
EqualStringArrays(string, string)
-
GetDateWordsOfDTFI(DateTimeFormatInfo)
-
GetFormatFlagGenitiveMonth(string, string, string, string)
-
GetFormatFlagUseHebrewCalendar(int)
-
GetFormatFlagUseSpaceInDayNames(string, string)
-
GetFormatFlagUseSpaceInMonthNames(string, string, string, string)
-
KnownWords()
-
ScanDateWord(string)
-
ScanRepeatChar(string, char, int, int)
-
SkipWhiteSpacesAndNonLetter(string, int)
-
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.Globalization;
- using System.Collections;
- using System.Text;
-
-
-
-
-
-
- internal enum FORMATFLAGS
- {
- None = 0,
- UseGenitiveMonth = 1,
- UseLeapYearMonth = 2,
- UseSpacesInMonthNames = 4,
- UseHebrewParsing = 8,
- UseSpacesInDayNames = 16,
-
- UseDigitPrefixInTokens = 32
-
- }
-
-
-
-
-
-
- internal enum CalendarId : ushort
- {
- GREGORIAN = 1,
-
- GREGORIAN_US = 2,
-
- JAPAN = 3,
-
- TAIWAN = 4,
-
- KOREA = 5,
-
- HIJRI = 6,
-
- THAI = 7,
-
- HEBREW = 8,
-
- GREGORIAN_ME_FRENCH = 9,
-
- GREGORIAN_ARABIC = 10,
-
- GREGORIAN_XLIT_ENGLISH = 11,
-
- GREGORIAN_XLIT_FRENCH = 12,
-
- JULIAN = 13,
- JAPANESELUNISOLAR = 14,
- CHINESELUNISOLAR = 15,
- SAKA = 16,
-
- LUNAR_ETO_CHN = 17,
-
- LUNAR_ETO_KOR = 18,
-
- LUNAR_ETO_ROKUYOU = 19,
-
- KOREANLUNISOLAR = 20,
- TAIWANLUNISOLAR = 21,
- PERSIAN = 22,
- UMALQURA = 23
- }
-
- internal class DateTimeFormatInfoScanner
- {
-
-
-
-
-
-
- internal const char MonthPostfixChar = '';
-
-
-
-
-
-
-
-
-
-
-
- internal const char IgnorableSymbolChar = '';
-
-
- internal const string CJKYearSuff = "年";
- internal const string CJKMonthSuff = "月";
- internal const string CJKDaySuff = "日";
-
- internal const string KoreanYearSuff = "년";
- internal const string KoreanMonthSuff = "월";
- internal const string KoreanDaySuff = "일";
-
- internal const string KoreanHourSuff = "시";
- internal const string KoreanMinuteSuff = "분";
- internal const string KoreanSecondSuff = "초";
-
- internal const string CJKHourSuff = "時";
- internal const string ChineseHourSuff = "时";
-
- internal const string CJKMinuteSuff = "分";
- internal const string CJKSecondSuff = "秒";
-
-
- internal ArrayList m_dateWords = new ArrayList();
-
- static internal Hashtable m_knownWords;
-
- Hashtable KnownWords {
- get {
- if (m_knownWords == null) {
- Hashtable temp = new Hashtable();
-
-
-
- temp.Add("/", String.Empty);
- temp.Add("-", String.Empty);
- temp.Add(".", String.Empty);
-
- temp.Add(CJKYearSuff, String.Empty);
- temp.Add(CJKMonthSuff, String.Empty);
- temp.Add(CJKDaySuff, String.Empty);
- temp.Add(KoreanYearSuff, String.Empty);
- temp.Add(KoreanMonthSuff, String.Empty);
- temp.Add(KoreanDaySuff, String.Empty);
- temp.Add(KoreanHourSuff, String.Empty);
- temp.Add(KoreanMinuteSuff, String.Empty);
- temp.Add(KoreanSecondSuff, String.Empty);
- temp.Add(CJKHourSuff, String.Empty);
- temp.Add(ChineseHourSuff, String.Empty);
- temp.Add(CJKMinuteSuff, String.Empty);
- temp.Add(CJKSecondSuff, String.Empty);
-
- m_knownWords = temp;
- }
- return (m_knownWords);
- }
- }
-
- ////////////////////////////////////////////////////////////////////////////
-
-
-
-
-
-
-
-
-
-
- ////////////////////////////////////////////////////////////////////////////
- static internal int SkipWhiteSpacesAndNonLetter(string pattern, int currentIndex)
- {
- while (currentIndex < pattern.Length) {
- char ch = pattern[currentIndex];
- if (ch == '\\') {
-
- currentIndex++;
- if (currentIndex < pattern.Length) {
- ch = pattern[currentIndex];
- if (ch == '\'') {
-
-
- continue;
- }
-
- }
- else {
-
- break;
- }
- }
- if (Char.IsLetter(ch) || ch == '\'' || ch == '.') {
- break;
- }
-
- currentIndex++;
- }
- return (currentIndex);
- }
-
- ////////////////////////////////////////////////////////////////////////////
-
-
-
-
-
-
-
-
-
-
- ////////////////////////////////////////////////////////////////////////////
- internal void AddDateWordOrPostfix(string formatPostfix, string str)
- {
- if (str.Length > 0) {
-
- if (str.Equals(".")) {
- AddIgnorableSymbols(".");
- return;
- }
- if (KnownWords[str] == null) {
- if (m_dateWords == null) {
- m_dateWords = new ArrayList();
- }
- if (formatPostfix == "MMMM") {
-
- string temp = MonthPostfixChar + str;
- if (!m_dateWords.Contains(temp)) {
- m_dateWords.Add(temp);
- }
- }
- else {
- if (!m_dateWords.Contains(str)) {
- m_dateWords.Add(str);
- }
- if (str[str.Length - 1] == '.') {
-
- string strWithoutDot = str.Substring(0, str.Length - 1);
- if (!m_dateWords.Contains(strWithoutDot)) {
- m_dateWords.Add(strWithoutDot);
- }
-
- }
- }
- }
- }
-
- }
-
- ////////////////////////////////////////////////////////////////////////////
-
-
-
-
-
-
-
-
-
-
-
-
-
- ////////////////////////////////////////////////////////////////////////////
- internal int AddDateWords(string pattern, int index, string formatPostfix)
- {
-
- int newIndex = SkipWhiteSpacesAndNonLetter(pattern, index);
- if (newIndex != index && formatPostfix != null) {
-
- formatPostfix = null;
- }
- index = newIndex;
-
-
-
- StringBuilder dateWord = new StringBuilder();
-
-
-
- while (index < pattern.Length) {
- char ch = pattern[index];
- if (ch == '\'') {
-
-
- AddDateWordOrPostfix(formatPostfix, dateWord.ToString());
- index++;
- break;
- }
- else if (ch == '\\') {
-
-
-
-
-
- index++;
- if (index < pattern.Length) {
- dateWord.Append(pattern[index]);
- index++;
- }
- }
- else if (Char.IsWhiteSpace(ch)) {
-
- AddDateWordOrPostfix(formatPostfix, dateWord.ToString());
- if (formatPostfix != null) {
-
- formatPostfix = null;
- }
-
- dateWord.Length = 0;
- index++;
- }
- else {
- dateWord.Append(ch);
- index++;
- }
- }
- return (index);
- }
-
- ////////////////////////////////////////////////////////////////////////////
-
-
-
- ////////////////////////////////////////////////////////////////////////////
- static internal int ScanRepeatChar(string pattern, char ch, int index, out int count)
- {
- count = 1;
- while (++index < pattern.Length && pattern[index] == ch) {
- count++;
- }
-
- return (index);
- }
-
- ////////////////////////////////////////////////////////////////////////////
-
-
-
-
-
-
-
-
-
-
-
-
- ////////////////////////////////////////////////////////////////////////////
-
- internal void AddIgnorableSymbols(string text)
- {
- if (m_dateWords == null) {
-
- m_dateWords = new ArrayList();
- }
-
- string temp = IgnorableSymbolChar + text;
- if (!m_dateWords.Contains(temp)) {
- m_dateWords.Add(temp);
- }
- }
-
-
-
-
-
- enum FoundDatePattern
- {
- None = 0,
- FoundYearPatternFlag = 1,
- FoundMonthPatternFlag = 2,
- FoundDayPatternFlag = 4,
- FoundYMDPatternFlag = 7
-
- }
-
-
- FoundDatePattern m_ymdFlags = FoundDatePattern.None;
-
-
- ////////////////////////////////////////////////////////////////////////////
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ////////////////////////////////////////////////////////////////////////////
- internal void ScanDateWord(string pattern)
- {
-
-
- m_ymdFlags = FoundDatePattern.None;
-
- int i = 0;
- while (i < pattern.Length) {
- char ch = pattern[i];
- int chCount;
-
- switch (ch) {
- case '\'':
-
- i = AddDateWords(pattern, i + 1, null);
- break;
- case 'M':
- i = ScanRepeatChar(pattern, 'M', i, out chCount);
- if (chCount >= 4) {
- if (i < pattern.Length && pattern[i] == '\'') {
- i = AddDateWords(pattern, i + 1, "MMMM");
- }
- }
- m_ymdFlags |= FoundDatePattern.FoundMonthPatternFlag;
- break;
- case 'y':
- i = ScanRepeatChar(pattern, 'y', i, out chCount);
- m_ymdFlags |= FoundDatePattern.FoundYearPatternFlag;
- break;
- case 'd':
- i = ScanRepeatChar(pattern, 'd', i, out chCount);
- if (chCount <= 2) {
-
-
- m_ymdFlags |= FoundDatePattern.FoundDayPatternFlag;
- }
- break;
- case '\\':
-
-
- i += 2;
- break;
- case '.':
- if (m_ymdFlags == FoundDatePattern.FoundYMDPatternFlag) {
-
-
-
- AddIgnorableSymbols(".");
- m_ymdFlags = FoundDatePattern.None;
- }
- i++;
- break;
- default:
- if (m_ymdFlags == FoundDatePattern.FoundYMDPatternFlag && !Char.IsWhiteSpace(ch)) {
-
- m_ymdFlags = FoundDatePattern.None;
- }
-
- i++;
- break;
- }
- }
- }
-
- ////////////////////////////////////////////////////////////////////////////
-
-
-
- ////////////////////////////////////////////////////////////////////////////
-
- internal string[] GetDateWordsOfDTFI(DateTimeFormatInfo dtfi)
- {
-
- string[] datePatterns = dtfi.GetAllDateTimePatterns('D');
- int i;
- for (i = 0; i < datePatterns.Length; i++) {
- ScanDateWord(datePatterns[i]);
- }
- datePatterns = dtfi.GetAllDateTimePatterns('d');
- for (i = 0; i < datePatterns.Length; i++) {
- ScanDateWord(datePatterns[i]);
- }
-
- datePatterns = dtfi.GetAllDateTimePatterns('y');
- for (i = 0; i < datePatterns.Length; i++) {
- ScanDateWord(datePatterns[i]);
- }
- string[] result = null;
- if (m_dateWords != null && m_dateWords.Count > 0) {
- result = new string[m_dateWords.Count];
- for (i = 0; i < m_dateWords.Count; i++) {
- result[i] = (string)m_dateWords[i];
- }
- }
- return (result);
- }
-
-
- ////////////////////////////////////////////////////////////////////////////
-
-
-
-
- ////////////////////////////////////////////////////////////////////////////
- static internal FORMATFLAGS GetFormatFlagGenitiveMonth(string[] monthNames, string[] genitveMonthNames, string[] abbrevMonthNames, string[] genetiveAbbrevMonthNames)
- {
-
- return ((!EqualStringArrays(monthNames, genitveMonthNames) || !EqualStringArrays(abbrevMonthNames, genetiveAbbrevMonthNames)) ? FORMATFLAGS.UseGenitiveMonth : 0);
- }
-
- ////////////////////////////////////////////////////////////////////////////
-
-
-
- ////////////////////////////////////////////////////////////////////////////
- static internal FORMATFLAGS GetFormatFlagUseSpaceInMonthNames(string[] monthNames, string[] genitveMonthNames, string[] abbrevMonthNames, string[] genetiveAbbrevMonthNames)
- {
- FORMATFLAGS formatFlags = 0;
- formatFlags |= (ArrayElementsBeginWithDigit(monthNames) || ArrayElementsBeginWithDigit(genitveMonthNames) || ArrayElementsBeginWithDigit(abbrevMonthNames) || ArrayElementsBeginWithDigit(genetiveAbbrevMonthNames) ? FORMATFLAGS.UseDigitPrefixInTokens : 0);
-
- formatFlags |= (ArrayElementsHaveSpace(monthNames) || ArrayElementsHaveSpace(genitveMonthNames) || ArrayElementsHaveSpace(abbrevMonthNames) || ArrayElementsHaveSpace(genetiveAbbrevMonthNames) ? FORMATFLAGS.UseSpacesInMonthNames : 0);
- return (formatFlags);
- }
-
- ////////////////////////////////////////////////////////////////////////////
-
-
-
- ////////////////////////////////////////////////////////////////////////////
- static internal FORMATFLAGS GetFormatFlagUseSpaceInDayNames(string[] dayNames, string[] abbrevDayNames)
- {
- return ((ArrayElementsHaveSpace(dayNames) || ArrayElementsHaveSpace(abbrevDayNames)) ? FORMATFLAGS.UseSpacesInDayNames : 0);
-
- }
-
- ////////////////////////////////////////////////////////////////////////////
-
-
-
- ////////////////////////////////////////////////////////////////////////////
- static internal FORMATFLAGS GetFormatFlagUseHebrewCalendar(int calID)
- {
- return (calID == (int)CalendarId.HEBREW ? FORMATFLAGS.UseHebrewParsing | FORMATFLAGS.UseLeapYearMonth : 0);
- }
-
-
-
-
-
-
-
-
-
- private static bool EqualStringArrays(string[] array1, string[] array2)
- {
- if (array1.Length != array2.Length) {
- return false;
- }
-
- for (int i = 0; i < array1.Length; i++) {
- if (!array1[i].Equals(array2[i])) {
- return false;
- }
- }
-
- return true;
- }
-
-
-
-
-
-
-
-
- private static bool ArrayElementsHaveSpace(string[] array)
- {
-
- for (int i = 0; i < array.Length; i++) {
-
-
- for (int j = 0; j < array[i].Length; j++) {
- if (Char.IsWhiteSpace(array[i][j])) {
- return true;
- }
- }
- }
-
- return false;
- }
-
-
- ////////////////////////////////////////////////////////////////////////////
-
-
-
- ////////////////////////////////////////////////////////////////////////////
- private static bool ArrayElementsBeginWithDigit(string[] array)
- {
-
- for (int i = 0; i < array.Length; i++) {
-
-
- if (array[i].Length > 0 && array[i][0] >= '0' && array[i][0] <= '9') {
- int index = 1;
- while (index < array[i].Length && array[i][index] >= '0' && array[i][index] <= '9') {
-
- index++;
- }
- if (index == array[i].Length) {
- return (false);
- }
-
- if (index == array[i].Length - 1) {
-
-
-
- switch (array[i][index]) {
- case '月':
- case '월':
-
-
- return (false);
- }
- }
- return (true);
- }
- }
-
- return false;
- }
-
- }
- }