This commit is contained in:
niko
2026-06-04 11:42:34 +02:00
parent f39ba70a9f
commit e720b98cd1
7488 changed files with 2493818 additions and 0 deletions
+201
View File
@@ -0,0 +1,201 @@
using System;
using System.Text;
namespace System.Globalization
{
// Token: 0x0200018B RID: 395
internal class Bootstring
{
// Token: 0x060013B2 RID: 5042 RVA: 0x0004C8C0 File Offset: 0x0004AAC0
public Bootstring(char delimiter, int baseNum, int tmin, int tmax, int skew, int damp, int initialBias, int initialN)
{
this.delimiter = delimiter;
this.base_num = baseNum;
this.tmin = tmin;
this.tmax = tmax;
this.skew = skew;
this.damp = damp;
this.initial_bias = initialBias;
this.initial_n = initialN;
}
// Token: 0x060013B3 RID: 5043 RVA: 0x0004C910 File Offset: 0x0004AB10
public string Encode(string s, int offset)
{
int num = this.initial_n;
int num2 = 0;
int num3 = this.initial_bias;
StringBuilder stringBuilder = new StringBuilder();
for (int i = 0; i < s.Length; i++)
{
if (s[i] < '\u0080')
{
stringBuilder.Append(s[i]);
}
}
int length;
int j = (length = stringBuilder.Length);
if (length > 0)
{
stringBuilder.Append(this.delimiter);
}
while (j < s.Length)
{
int num4 = int.MaxValue;
for (int k = 0; k < s.Length; k++)
{
if ((int)s[k] >= num && (int)s[k] < num4)
{
num4 = (int)s[k];
}
}
checked
{
num2 += (num4 - num) * (j + 1);
num = num4;
foreach (char c in s)
{
if ((int)c < num || c < '\u0080')
{
num2++;
}
unchecked
{
if ((int)c == num)
{
int num5 = num2;
int num6 = this.base_num;
for (;;)
{
int num7 = ((num6 > num3 + this.tmin) ? ((num6 < num3 + this.tmax) ? (num6 - num3) : this.tmax) : this.tmin);
if (num5 < num7)
{
break;
}
stringBuilder.Append(this.EncodeDigit(num7 + (num5 - num7) % (this.base_num - num7)));
num5 = (num5 - num7) / (this.base_num - num7);
num6 += this.base_num;
}
stringBuilder.Append(this.EncodeDigit(num5));
num3 = this.Adapt(num2, j + 1, j == length);
num2 = 0;
j++;
}
}
}
}
num2++;
num++;
}
return stringBuilder.ToString();
}
// Token: 0x060013B4 RID: 5044 RVA: 0x0004CB18 File Offset: 0x0004AD18
private char EncodeDigit(int d)
{
return (char)((d >= 26) ? (d - 26 + 48) : (d + 97));
}
// Token: 0x060013B5 RID: 5045 RVA: 0x0004CB34 File Offset: 0x0004AD34
private int DecodeDigit(char c)
{
return (c - '0' >= '\n') ? ((c - 'A' >= '\u001a') ? ((c - 'a' >= '\u001a') ? this.base_num : ((int)(c - 'a'))) : ((int)(c - 'A'))) : ((int)(c - '\u0016'));
}
// Token: 0x060013B6 RID: 5046 RVA: 0x0004CB84 File Offset: 0x0004AD84
private int Adapt(int delta, int numPoints, bool firstTime)
{
if (firstTime)
{
delta /= this.damp;
}
else
{
delta /= 2;
}
delta += delta / numPoints;
int num = 0;
while (delta > (this.base_num - this.tmin) * this.tmax / 2)
{
delta /= this.base_num - this.tmin;
num += this.base_num;
}
return num + (this.base_num - this.tmin + 1) * delta / (delta + this.skew);
}
// Token: 0x060013B7 RID: 5047 RVA: 0x0004CC0C File Offset: 0x0004AE0C
public string Decode(string s, int offset)
{
int num = this.initial_n;
int num2 = 0;
int num3 = this.initial_bias;
int num4 = 0;
StringBuilder stringBuilder = new StringBuilder();
for (int i = 0; i < s.Length; i++)
{
if (s[i] == this.delimiter)
{
num4 = i;
}
}
if (num4 < 0)
{
return s;
}
stringBuilder.Append(s, 0, num4);
int j = ((num4 <= 0) ? 0 : (num4 + 1));
while (j < s.Length)
{
int num5 = num2;
int num6 = 1;
int num7 = this.base_num;
for (;;)
{
int num8 = this.DecodeDigit(s[j++]);
num2 += num8 * num6;
int num9 = ((num7 > num3 + this.tmin) ? ((num7 < num3 + this.tmax) ? (num7 - num3) : this.tmax) : this.tmin);
if (num8 < num9)
{
break;
}
num6 *= this.base_num - num9;
num7 += this.base_num;
}
num3 = this.Adapt(num2 - num5, stringBuilder.Length + 1, num5 == 0);
num += num2 / (stringBuilder.Length + 1);
num2 %= stringBuilder.Length + 1;
if (num < 128)
{
throw new ArgumentException(string.Format("Invalid Bootstring decode result, at {0}", offset + j));
}
stringBuilder.Insert(num2, (char)num);
num2++;
}
return stringBuilder.ToString();
}
// Token: 0x04000574 RID: 1396
private readonly char delimiter;
// Token: 0x04000575 RID: 1397
private readonly int base_num;
// Token: 0x04000576 RID: 1398
private readonly int tmin;
// Token: 0x04000577 RID: 1399
private readonly int tmax;
// Token: 0x04000578 RID: 1400
private readonly int skew;
// Token: 0x04000579 RID: 1401
private readonly int damp;
// Token: 0x0400057A RID: 1402
private readonly int initial_bias;
// Token: 0x0400057B RID: 1403
private readonly int initial_n;
}
}
@@ -0,0 +1,150 @@
using System;
namespace System.Globalization
{
// Token: 0x02000174 RID: 372
internal class CCEastAsianLunisolarCalendar
{
// Token: 0x06001207 RID: 4615 RVA: 0x00046D7C File Offset: 0x00044F7C
public static int fixed_from_dmy(int day, int month, int year)
{
throw new Exception("fixed_from_dmy");
}
// Token: 0x06001208 RID: 4616 RVA: 0x00046D88 File Offset: 0x00044F88
public static int year_from_fixed(int date)
{
throw new Exception("year_from_fixed");
}
// Token: 0x06001209 RID: 4617 RVA: 0x00046D94 File Offset: 0x00044F94
public static void my_from_fixed(out int month, out int year, int date)
{
throw new Exception("my_from_fixed");
}
// Token: 0x0600120A RID: 4618 RVA: 0x00046DA0 File Offset: 0x00044FA0
public static void dmy_from_fixed(out int day, out int month, out int year, int date)
{
throw new Exception("dmy_from_fixed");
}
// Token: 0x0600120B RID: 4619 RVA: 0x00046DAC File Offset: 0x00044FAC
public static DateTime AddMonths(DateTime date, int months)
{
throw new Exception("AddMonths");
}
// Token: 0x0600120C RID: 4620 RVA: 0x00046DB8 File Offset: 0x00044FB8
public static DateTime AddYears(DateTime date, int years)
{
throw new Exception("AddYears");
}
// Token: 0x0600120D RID: 4621 RVA: 0x00046DC4 File Offset: 0x00044FC4
public static int GetDayOfMonth(DateTime date)
{
throw new Exception("GetDayOfMonth");
}
// Token: 0x0600120E RID: 4622 RVA: 0x00046DD0 File Offset: 0x00044FD0
public static int GetDayOfYear(DateTime date)
{
throw new Exception("GetDayOfYear");
}
// Token: 0x0600120F RID: 4623 RVA: 0x00046DDC File Offset: 0x00044FDC
public static int GetDaysInMonth(int gyear, int month)
{
throw new Exception("GetDaysInMonth");
}
// Token: 0x06001210 RID: 4624 RVA: 0x00046DE8 File Offset: 0x00044FE8
public static int GetDaysInYear(int year)
{
throw new Exception("GetDaysInYear");
}
// Token: 0x06001211 RID: 4625 RVA: 0x00046DF4 File Offset: 0x00044FF4
public static int GetMonth(DateTime date)
{
throw new Exception("GetMonth");
}
// Token: 0x06001212 RID: 4626 RVA: 0x00046E00 File Offset: 0x00045000
public static bool IsLeapMonth(int gyear, int month)
{
int num = gyear % 19;
bool flag = false;
bool flag2 = false;
double num2 = 0.0;
for (int i = 0; i < num; i++)
{
int num3 = 0;
for (int j = 1; j <= month; j++)
{
if (flag2)
{
num3 += 30;
flag2 = false;
if (i == num && j == month)
{
return true;
}
}
else
{
num3 += ((!flag) ? 29 : 30);
flag = !flag;
num2 += 30.44;
if (num2 - (double)num3 > 29.0)
{
flag2 = true;
}
}
}
}
return false;
}
// Token: 0x06001213 RID: 4627 RVA: 0x00046EB0 File Offset: 0x000450B0
public static bool IsLeapYear(int gyear)
{
int num = gyear % 19;
int num2 = num;
switch (num2)
{
case 6:
case 9:
case 11:
break;
default:
switch (num2)
{
case 0:
case 3:
break;
default:
switch (num2)
{
case 14:
case 17:
return true;
}
return false;
}
break;
}
return true;
}
// Token: 0x06001214 RID: 4628 RVA: 0x00046F1C File Offset: 0x0004511C
public static DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond)
{
throw new Exception("ToDateTime");
}
// Token: 0x040004A9 RID: 1193
private const int initial_epact = 29;
}
}
@@ -0,0 +1,173 @@
using System;
using System.Collections;
namespace System.Globalization
{
// Token: 0x02000177 RID: 375
[Serializable]
internal class CCEastAsianLunisolarEraHandler
{
// Token: 0x06001223 RID: 4643 RVA: 0x000472B4 File Offset: 0x000454B4
public CCEastAsianLunisolarEraHandler()
{
this._Eras = new SortedList();
}
// Token: 0x17000307 RID: 775
// (get) Token: 0x06001224 RID: 4644 RVA: 0x000472C8 File Offset: 0x000454C8
public int[] Eras
{
get
{
int[] array = new int[this._Eras.Count];
for (int i = 0; i < this._Eras.Count; i++)
{
array[i] = ((CCEastAsianLunisolarEraHandler.Era)this._Eras.GetByIndex(i)).Nr;
}
return array;
}
}
// Token: 0x06001225 RID: 4645 RVA: 0x00047320 File Offset: 0x00045520
public void appendEra(int nr, int rd_start, int rd_end)
{
CCEastAsianLunisolarEraHandler.Era era = new CCEastAsianLunisolarEraHandler.Era(nr, rd_start, rd_end);
this._Eras[nr] = era;
}
// Token: 0x06001226 RID: 4646 RVA: 0x00047350 File Offset: 0x00045550
public void appendEra(int nr, int rd_start)
{
this.appendEra(nr, rd_start, CCFixed.FromDateTime(DateTime.MaxValue));
}
// Token: 0x06001227 RID: 4647 RVA: 0x00047364 File Offset: 0x00045564
public int GregorianYear(int year, int era)
{
return ((CCEastAsianLunisolarEraHandler.Era)this._Eras[era]).GregorianYear(year);
}
// Token: 0x06001228 RID: 4648 RVA: 0x00047390 File Offset: 0x00045590
public int EraYear(out int era, int date)
{
foreach (object obj in this._Eras.Values)
{
CCEastAsianLunisolarEraHandler.Era era2 = (CCEastAsianLunisolarEraHandler.Era)obj;
if (era2.Covers(date))
{
return era2.EraYear(out era, date);
}
}
throw new ArgumentOutOfRangeException("date", "Time value was out of era range.");
}
// Token: 0x06001229 RID: 4649 RVA: 0x0004742C File Offset: 0x0004562C
public void CheckDateTime(DateTime time)
{
int num = CCFixed.FromDateTime(time);
if (!this.ValidDate(num))
{
throw new ArgumentOutOfRangeException("time", "Time value was out of era range.");
}
}
// Token: 0x0600122A RID: 4650 RVA: 0x0004745C File Offset: 0x0004565C
public bool ValidDate(int date)
{
foreach (object obj in this._Eras.Values)
{
if (((CCEastAsianLunisolarEraHandler.Era)obj).Covers(date))
{
return true;
}
}
return false;
}
// Token: 0x0600122B RID: 4651 RVA: 0x000474E0 File Offset: 0x000456E0
public bool ValidEra(int era)
{
return this._Eras.Contains(era);
}
// Token: 0x040004B0 RID: 1200
private SortedList _Eras;
// Token: 0x02000178 RID: 376
[Serializable]
private struct Era
{
// Token: 0x0600122C RID: 4652 RVA: 0x000474F4 File Offset: 0x000456F4
public Era(int nr, int start, int end)
{
if (nr == 0)
{
throw new ArgumentException("Era number shouldn't be zero.");
}
this._nr = nr;
if (start > end)
{
throw new ArgumentException("Era should start before end.");
}
this._start = start;
this._end = end;
this._gregorianYearStart = CCGregorianCalendar.year_from_fixed(this._start);
int num = CCGregorianCalendar.year_from_fixed(this._end);
this._maxYear = num - this._gregorianYearStart + 1;
}
// Token: 0x17000308 RID: 776
// (get) Token: 0x0600122D RID: 4653 RVA: 0x00047568 File Offset: 0x00045768
public int Nr
{
get
{
return this._nr;
}
}
// Token: 0x0600122E RID: 4654 RVA: 0x00047570 File Offset: 0x00045770
public int GregorianYear(int year)
{
if (year < 1 || year > this._maxYear)
{
throw new ArgumentOutOfRangeException("year", string.Format("Valid Values are between {0} and {1}, inclusive.", 1, this._maxYear));
}
return year + this._gregorianYearStart - 1;
}
// Token: 0x0600122F RID: 4655 RVA: 0x000475C0 File Offset: 0x000457C0
public bool Covers(int date)
{
return this._start <= date && date <= this._end;
}
// Token: 0x06001230 RID: 4656 RVA: 0x000475E0 File Offset: 0x000457E0
public int EraYear(out int era, int date)
{
if (!this.Covers(date))
{
throw new ArgumentOutOfRangeException("date", "Time was out of Era range.");
}
int num = CCGregorianCalendar.year_from_fixed(date);
era = this._nr;
return num - this._gregorianYearStart + 1;
}
// Token: 0x040004B1 RID: 1201
private int _nr;
// Token: 0x040004B2 RID: 1202
private int _start;
// Token: 0x040004B3 RID: 1203
private int _gregorianYearStart;
// Token: 0x040004B4 RID: 1204
private int _end;
// Token: 0x040004B5 RID: 1205
private int _maxYear;
}
}
}
+65
View File
@@ -0,0 +1,65 @@
using System;
namespace System.Globalization
{
// Token: 0x0200016B RID: 363
internal class CCFixed
{
// Token: 0x060011C0 RID: 4544 RVA: 0x00046210 File Offset: 0x00044410
public static DateTime ToDateTime(int date)
{
long num = (long)(date - 1) * 864000000000L;
return new DateTime(num);
}
// Token: 0x060011C1 RID: 4545 RVA: 0x00046234 File Offset: 0x00044434
public static DateTime ToDateTime(int date, int hour, int minute, int second, double milliseconds)
{
return CCFixed.ToDateTime(date).AddHours((double)hour).AddMinutes((double)minute)
.AddSeconds((double)second)
.AddMilliseconds(milliseconds);
}
// Token: 0x060011C2 RID: 4546 RVA: 0x00046270 File Offset: 0x00044470
public static int FromDateTime(DateTime time)
{
return 1 + (int)(time.Ticks / 864000000000L);
}
// Token: 0x060011C3 RID: 4547 RVA: 0x00046288 File Offset: 0x00044488
public static DayOfWeek day_of_week(int date)
{
return (DayOfWeek)CCMath.mod(date, 7);
}
// Token: 0x060011C4 RID: 4548 RVA: 0x00046294 File Offset: 0x00044494
public static int kday_on_or_before(int date, int k)
{
return date - (int)CCFixed.day_of_week(date - k);
}
// Token: 0x060011C5 RID: 4549 RVA: 0x000462A0 File Offset: 0x000444A0
public static int kday_on_or_after(int date, int k)
{
return CCFixed.kday_on_or_before(date + 6, k);
}
// Token: 0x060011C6 RID: 4550 RVA: 0x000462AC File Offset: 0x000444AC
public static int kd_nearest(int date, int k)
{
return CCFixed.kday_on_or_before(date + 3, k);
}
// Token: 0x060011C7 RID: 4551 RVA: 0x000462B8 File Offset: 0x000444B8
public static int kday_after(int date, int k)
{
return CCFixed.kday_on_or_before(date + 7, k);
}
// Token: 0x060011C8 RID: 4552 RVA: 0x000462C4 File Offset: 0x000444C4
public static int kday_before(int date, int k)
{
return CCFixed.kday_on_or_before(date - 1, k);
}
}
}
@@ -0,0 +1,236 @@
using System;
namespace System.Globalization
{
// Token: 0x0200016C RID: 364
internal class CCGregorianCalendar
{
// Token: 0x060011CA RID: 4554 RVA: 0x000462D8 File Offset: 0x000444D8
public static bool is_leap_year(int year)
{
if (CCMath.mod(year, 4) != 0)
{
return false;
}
int num = CCMath.mod(year, 400);
return num != 100 && num != 200 && num != 300;
}
// Token: 0x060011CB RID: 4555 RVA: 0x0004632C File Offset: 0x0004452C
public static int fixed_from_dmy(int day, int month, int year)
{
int num = 0;
num += 365 * (year - 1);
num += CCMath.div(year - 1, 4);
num -= CCMath.div(year - 1, 100);
num += CCMath.div(year - 1, 400);
num += CCMath.div(367 * month - 362, 12);
if (month > 2)
{
num += ((!CCGregorianCalendar.is_leap_year(year)) ? (-2) : (-1));
}
return num + day;
}
// Token: 0x060011CC RID: 4556 RVA: 0x000463AC File Offset: 0x000445AC
public static int year_from_fixed(int date)
{
int num = date - 1;
int num2 = CCMath.div_mod(out num, num, 146097);
int num3 = CCMath.div_mod(out num, num, 36524);
int num4 = CCMath.div_mod(out num, num, 1461);
int num5 = CCMath.div(num, 365);
int num6 = 400 * num2 + 100 * num3 + 4 * num4 + num5;
return (num3 != 4 && num5 != 4) ? (num6 + 1) : num6;
}
// Token: 0x060011CD RID: 4557 RVA: 0x00046424 File Offset: 0x00044624
public static void my_from_fixed(out int month, out int year, int date)
{
year = CCGregorianCalendar.year_from_fixed(date);
int num = date - CCGregorianCalendar.fixed_from_dmy(1, 1, year);
int num2;
if (date < CCGregorianCalendar.fixed_from_dmy(1, 3, year))
{
num2 = 0;
}
else if (CCGregorianCalendar.is_leap_year(year))
{
num2 = 1;
}
else
{
num2 = 2;
}
month = CCMath.div(12 * (num + num2) + 373, 367);
}
// Token: 0x060011CE RID: 4558 RVA: 0x00046488 File Offset: 0x00044688
public static void dmy_from_fixed(out int day, out int month, out int year, int date)
{
CCGregorianCalendar.my_from_fixed(out month, out year, date);
day = date - CCGregorianCalendar.fixed_from_dmy(1, month, year) + 1;
}
// Token: 0x060011CF RID: 4559 RVA: 0x000464A4 File Offset: 0x000446A4
public static int month_from_fixed(int date)
{
int num;
int num2;
CCGregorianCalendar.my_from_fixed(out num, out num2, date);
return num;
}
// Token: 0x060011D0 RID: 4560 RVA: 0x000464BC File Offset: 0x000446BC
public static int day_from_fixed(int date)
{
int num;
int num2;
int num3;
CCGregorianCalendar.dmy_from_fixed(out num, out num2, out num3, date);
return num;
}
// Token: 0x060011D1 RID: 4561 RVA: 0x000464D8 File Offset: 0x000446D8
public static int date_difference(int dayA, int monthA, int yearA, int dayB, int monthB, int yearB)
{
return CCGregorianCalendar.fixed_from_dmy(dayB, monthB, yearB) - CCGregorianCalendar.fixed_from_dmy(dayA, monthA, yearA);
}
// Token: 0x060011D2 RID: 4562 RVA: 0x000464F0 File Offset: 0x000446F0
public static int day_number(int day, int month, int year)
{
return CCGregorianCalendar.date_difference(31, 12, year - 1, day, month, year);
}
// Token: 0x060011D3 RID: 4563 RVA: 0x00046504 File Offset: 0x00044704
public static int days_remaining(int day, int month, int year)
{
return CCGregorianCalendar.date_difference(day, month, year, 31, 12, year);
}
// Token: 0x060011D4 RID: 4564 RVA: 0x00046514 File Offset: 0x00044714
public static DateTime AddMonths(DateTime time, int months)
{
int num = CCFixed.FromDateTime(time);
int num2;
int num3;
int num4;
CCGregorianCalendar.dmy_from_fixed(out num2, out num3, out num4, num);
num3 += months;
num4 += CCMath.div_mod(out num3, num3, 12);
int daysInMonth = CCGregorianCalendar.GetDaysInMonth(num4, num3);
if (num2 > daysInMonth)
{
num2 = daysInMonth;
}
num = CCGregorianCalendar.fixed_from_dmy(num2, num3, num4);
return CCFixed.ToDateTime(num).Add(time.TimeOfDay);
}
// Token: 0x060011D5 RID: 4565 RVA: 0x00046578 File Offset: 0x00044778
public static DateTime AddYears(DateTime time, int years)
{
int num = CCFixed.FromDateTime(time);
int num2;
int num3;
int num4;
CCGregorianCalendar.dmy_from_fixed(out num2, out num3, out num4, num);
num4 += years;
int daysInMonth = CCGregorianCalendar.GetDaysInMonth(num4, num3);
if (num2 > daysInMonth)
{
num2 = daysInMonth;
}
num = CCGregorianCalendar.fixed_from_dmy(num2, num3, num4);
return CCFixed.ToDateTime(num).Add(time.TimeOfDay);
}
// Token: 0x060011D6 RID: 4566 RVA: 0x000465D0 File Offset: 0x000447D0
public static int GetDayOfMonth(DateTime time)
{
return CCGregorianCalendar.day_from_fixed(CCFixed.FromDateTime(time));
}
// Token: 0x060011D7 RID: 4567 RVA: 0x000465E0 File Offset: 0x000447E0
public static int GetDayOfYear(DateTime time)
{
int num = CCFixed.FromDateTime(time);
int num2 = CCGregorianCalendar.year_from_fixed(num);
int num3 = CCGregorianCalendar.fixed_from_dmy(1, 1, num2);
return num - num3 + 1;
}
// Token: 0x060011D8 RID: 4568 RVA: 0x0004660C File Offset: 0x0004480C
public static int GetDaysInMonth(int year, int month)
{
int num = CCGregorianCalendar.fixed_from_dmy(1, month, year);
int num2 = CCGregorianCalendar.fixed_from_dmy(1, month + 1, year);
return num2 - num;
}
// Token: 0x060011D9 RID: 4569 RVA: 0x00046630 File Offset: 0x00044830
public static int GetDaysInYear(int year)
{
int num = CCGregorianCalendar.fixed_from_dmy(1, 1, year);
int num2 = CCGregorianCalendar.fixed_from_dmy(1, 1, year + 1);
return num2 - num;
}
// Token: 0x060011DA RID: 4570 RVA: 0x00046654 File Offset: 0x00044854
public static int GetMonth(DateTime time)
{
return CCGregorianCalendar.month_from_fixed(CCFixed.FromDateTime(time));
}
// Token: 0x060011DB RID: 4571 RVA: 0x00046664 File Offset: 0x00044864
public static int GetYear(DateTime time)
{
return CCGregorianCalendar.year_from_fixed(CCFixed.FromDateTime(time));
}
// Token: 0x060011DC RID: 4572 RVA: 0x00046674 File Offset: 0x00044874
public static bool IsLeapDay(int year, int month, int day)
{
return CCGregorianCalendar.is_leap_year(year) && month == 2 && day == 29;
}
// Token: 0x060011DD RID: 4573 RVA: 0x00046690 File Offset: 0x00044890
public static DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int milliseconds)
{
return CCFixed.ToDateTime(CCGregorianCalendar.fixed_from_dmy(day, month, year), hour, minute, second, (double)milliseconds);
}
// Token: 0x0400046F RID: 1135
private const int epoch = 1;
// Token: 0x0200016D RID: 365
public enum Month
{
// Token: 0x04000471 RID: 1137
january = 1,
// Token: 0x04000472 RID: 1138
february,
// Token: 0x04000473 RID: 1139
march,
// Token: 0x04000474 RID: 1140
april,
// Token: 0x04000475 RID: 1141
may,
// Token: 0x04000476 RID: 1142
june,
// Token: 0x04000477 RID: 1143
july,
// Token: 0x04000478 RID: 1144
august,
// Token: 0x04000479 RID: 1145
september,
// Token: 0x0400047A RID: 1146
october,
// Token: 0x0400047B RID: 1147
november,
// Token: 0x0400047C RID: 1148
december
}
}
}
@@ -0,0 +1,178 @@
using System;
using System.Collections;
using System.IO;
namespace System.Globalization
{
// Token: 0x02000175 RID: 373
[Serializable]
internal class CCGregorianEraHandler
{
// Token: 0x06001215 RID: 4629 RVA: 0x00046F28 File Offset: 0x00045128
public CCGregorianEraHandler()
{
this._Eras = new SortedList();
}
// Token: 0x17000305 RID: 773
// (get) Token: 0x06001216 RID: 4630 RVA: 0x00046F3C File Offset: 0x0004513C
public int[] Eras
{
get
{
int[] array = new int[this._Eras.Count];
for (int i = 0; i < this._Eras.Count; i++)
{
array[i] = ((CCGregorianEraHandler.Era)this._Eras.GetByIndex(i)).Nr;
}
return array;
}
}
// Token: 0x06001217 RID: 4631 RVA: 0x00046F94 File Offset: 0x00045194
public void appendEra(int nr, int rd_start, int rd_end)
{
CCGregorianEraHandler.Era era = new CCGregorianEraHandler.Era(nr, rd_start, rd_end);
this._Eras[nr] = era;
}
// Token: 0x06001218 RID: 4632 RVA: 0x00046FC4 File Offset: 0x000451C4
public void appendEra(int nr, int rd_start)
{
this.appendEra(nr, rd_start, CCFixed.FromDateTime(DateTime.MaxValue));
}
// Token: 0x06001219 RID: 4633 RVA: 0x00046FD8 File Offset: 0x000451D8
public int GregorianYear(int year, int era)
{
return ((CCGregorianEraHandler.Era)this._Eras[era]).GregorianYear(year);
}
// Token: 0x0600121A RID: 4634 RVA: 0x00047004 File Offset: 0x00045204
public int EraYear(out int era, int date)
{
IList valueList = this._Eras.GetValueList();
foreach (object obj in valueList)
{
CCGregorianEraHandler.Era era2 = (CCGregorianEraHandler.Era)obj;
if (era2.Covers(date))
{
return era2.EraYear(out era, date);
}
}
throw new ArgumentOutOfRangeException("date", "Time value was out of era range.");
}
// Token: 0x0600121B RID: 4635 RVA: 0x000470A4 File Offset: 0x000452A4
public void CheckDateTime(DateTime time)
{
int num = CCFixed.FromDateTime(time);
if (!this.ValidDate(num))
{
throw new ArgumentOutOfRangeException("time", "Time value was out of era range.");
}
}
// Token: 0x0600121C RID: 4636 RVA: 0x000470D4 File Offset: 0x000452D4
public bool ValidDate(int date)
{
IList valueList = this._Eras.GetValueList();
foreach (object obj in valueList)
{
if (((CCGregorianEraHandler.Era)obj).Covers(date))
{
return true;
}
}
return false;
}
// Token: 0x0600121D RID: 4637 RVA: 0x00047160 File Offset: 0x00045360
public bool ValidEra(int era)
{
return this._Eras.Contains(era);
}
// Token: 0x040004AA RID: 1194
private SortedList _Eras;
// Token: 0x02000176 RID: 374
[Serializable]
private struct Era
{
// Token: 0x0600121E RID: 4638 RVA: 0x00047174 File Offset: 0x00045374
public Era(int nr, int start, int end)
{
if (nr == 0)
{
throw new ArgumentException("Era number shouldn't be zero.");
}
this._nr = nr;
if (start > end)
{
throw new ArgumentException("Era should start before end.");
}
this._start = start;
this._end = end;
this._gregorianYearStart = CCGregorianCalendar.year_from_fixed(this._start);
int num = CCGregorianCalendar.year_from_fixed(this._end);
this._maxYear = num - this._gregorianYearStart + 1;
}
// Token: 0x17000306 RID: 774
// (get) Token: 0x0600121F RID: 4639 RVA: 0x000471E8 File Offset: 0x000453E8
public int Nr
{
get
{
return this._nr;
}
}
// Token: 0x06001220 RID: 4640 RVA: 0x000471F0 File Offset: 0x000453F0
public int GregorianYear(int year)
{
if (year < 1 || year > this._maxYear)
{
StringWriter stringWriter = new StringWriter();
stringWriter.Write("Valid Values are between {0} and {1}, inclusive.", 1, this._maxYear);
throw new ArgumentOutOfRangeException("year", stringWriter.ToString());
}
return year + this._gregorianYearStart - 1;
}
// Token: 0x06001221 RID: 4641 RVA: 0x00047250 File Offset: 0x00045450
public bool Covers(int date)
{
return this._start <= date && date <= this._end;
}
// Token: 0x06001222 RID: 4642 RVA: 0x00047270 File Offset: 0x00045470
public int EraYear(out int era, int date)
{
if (!this.Covers(date))
{
throw new ArgumentOutOfRangeException("date", "Time was out of Era range.");
}
int num = CCGregorianCalendar.year_from_fixed(date);
era = this._nr;
return num - this._gregorianYearStart + 1;
}
// Token: 0x040004AB RID: 1195
private int _nr;
// Token: 0x040004AC RID: 1196
private int _start;
// Token: 0x040004AD RID: 1197
private int _gregorianYearStart;
// Token: 0x040004AE RID: 1198
private int _end;
// Token: 0x040004AF RID: 1199
private int _maxYear;
}
}
}
@@ -0,0 +1,244 @@
using System;
namespace System.Globalization
{
// Token: 0x02000170 RID: 368
internal class CCHebrewCalendar
{
// Token: 0x060011EA RID: 4586 RVA: 0x0004686C File Offset: 0x00044A6C
public static bool is_leap_year(int year)
{
return CCMath.mod(7 * year + 1, 19) < 7;
}
// Token: 0x060011EB RID: 4587 RVA: 0x00046880 File Offset: 0x00044A80
public static int last_month_of_year(int year)
{
return (!CCHebrewCalendar.is_leap_year(year)) ? 12 : 13;
}
// Token: 0x060011EC RID: 4588 RVA: 0x00046898 File Offset: 0x00044A98
public static int elapsed_days(int year)
{
int num = CCMath.div(235 * year - 234, 19);
int num3;
int num2 = CCMath.div_mod(out num3, num, 1080);
int num4 = 204 + 793 * num3;
int num5 = 11 + 12 * num + 793 * num2 + CCMath.div(num4, 1080);
int num6 = 29 * num + CCMath.div(num5, 24);
if (CCMath.mod(3 * (num6 + 1), 7) < 3)
{
num6++;
}
return num6;
}
// Token: 0x060011ED RID: 4589 RVA: 0x00046920 File Offset: 0x00044B20
public static int new_year_delay(int year)
{
int num = CCHebrewCalendar.elapsed_days(year);
int num2 = CCHebrewCalendar.elapsed_days(year + 1);
if (num2 - num == 356)
{
return 2;
}
int num3 = CCHebrewCalendar.elapsed_days(year - 1);
if (num - num3 == 382)
{
return 1;
}
return 0;
}
// Token: 0x060011EE RID: 4590 RVA: 0x00046968 File Offset: 0x00044B68
public static int last_day_of_month(int month, int year)
{
if (month < 1 || month > 13)
{
throw new ArgumentOutOfRangeException("month", "Month should be between One and Thirteen.");
}
switch (month)
{
case 2:
return 29;
case 4:
return 29;
case 6:
return 29;
case 8:
if (!CCHebrewCalendar.long_heshvan(year))
{
return 29;
}
break;
case 9:
if (CCHebrewCalendar.short_kislev(year))
{
return 29;
}
break;
case 10:
return 29;
case 12:
if (!CCHebrewCalendar.is_leap_year(year))
{
return 29;
}
break;
case 13:
return 29;
}
return 30;
}
// Token: 0x060011EF RID: 4591 RVA: 0x00046A20 File Offset: 0x00044C20
public static bool long_heshvan(int year)
{
return CCMath.mod(CCHebrewCalendar.days_in_year(year), 10) == 5;
}
// Token: 0x060011F0 RID: 4592 RVA: 0x00046A34 File Offset: 0x00044C34
public static bool short_kislev(int year)
{
return CCMath.mod(CCHebrewCalendar.days_in_year(year), 10) == 3;
}
// Token: 0x060011F1 RID: 4593 RVA: 0x00046A48 File Offset: 0x00044C48
public static int days_in_year(int year)
{
return CCHebrewCalendar.fixed_from_dmy(1, 7, year + 1) - CCHebrewCalendar.fixed_from_dmy(1, 7, year);
}
// Token: 0x060011F2 RID: 4594 RVA: 0x00046A60 File Offset: 0x00044C60
public static int fixed_from_dmy(int day, int month, int year)
{
int num = -1373428;
num += CCHebrewCalendar.elapsed_days(year);
num += CCHebrewCalendar.new_year_delay(year);
if (month < 7)
{
int num2 = CCHebrewCalendar.last_month_of_year(year);
for (int i = 7; i <= num2; i++)
{
num += CCHebrewCalendar.last_day_of_month(i, year);
}
for (int i = 1; i < month; i++)
{
num += CCHebrewCalendar.last_day_of_month(i, year);
}
}
else
{
for (int i = 7; i < month; i++)
{
num += CCHebrewCalendar.last_day_of_month(i, year);
}
}
return num + day;
}
// Token: 0x060011F3 RID: 4595 RVA: 0x00046AF4 File Offset: 0x00044CF4
public static int year_from_fixed(int date)
{
int num = (int)Math.Floor((double)(date - -1373427) / 365.24682220597794);
int num2 = num;
while (date >= CCHebrewCalendar.fixed_from_dmy(1, 7, num2))
{
num2++;
}
return num2 - 1;
}
// Token: 0x060011F4 RID: 4596 RVA: 0x00046B38 File Offset: 0x00044D38
public static void my_from_fixed(out int month, out int year, int date)
{
year = CCHebrewCalendar.year_from_fixed(date);
int num = ((date >= CCHebrewCalendar.fixed_from_dmy(1, 1, year)) ? 1 : 7);
month = num;
while (date > CCHebrewCalendar.fixed_from_dmy(CCHebrewCalendar.last_day_of_month(month, year), month, year))
{
month++;
}
}
// Token: 0x060011F5 RID: 4597 RVA: 0x00046B8C File Offset: 0x00044D8C
public static void dmy_from_fixed(out int day, out int month, out int year, int date)
{
CCHebrewCalendar.my_from_fixed(out month, out year, date);
day = date - CCHebrewCalendar.fixed_from_dmy(1, month, year) + 1;
}
// Token: 0x060011F6 RID: 4598 RVA: 0x00046BA8 File Offset: 0x00044DA8
public static int month_from_fixed(int date)
{
int num;
int num2;
CCHebrewCalendar.my_from_fixed(out num, out num2, date);
return num;
}
// Token: 0x060011F7 RID: 4599 RVA: 0x00046BC0 File Offset: 0x00044DC0
public static int day_from_fixed(int date)
{
int num;
int num2;
int num3;
CCHebrewCalendar.dmy_from_fixed(out num, out num2, out num3, date);
return num;
}
// Token: 0x060011F8 RID: 4600 RVA: 0x00046BDC File Offset: 0x00044DDC
public static int date_difference(int dayA, int monthA, int yearA, int dayB, int monthB, int yearB)
{
return CCHebrewCalendar.fixed_from_dmy(dayB, monthB, yearB) - CCHebrewCalendar.fixed_from_dmy(dayA, monthA, yearA);
}
// Token: 0x060011F9 RID: 4601 RVA: 0x00046BF4 File Offset: 0x00044DF4
public static int day_number(int day, int month, int year)
{
return CCHebrewCalendar.date_difference(1, 7, year, day, month, year) + 1;
}
// Token: 0x060011FA RID: 4602 RVA: 0x00046C04 File Offset: 0x00044E04
public static int days_remaining(int day, int month, int year)
{
return CCHebrewCalendar.date_difference(day, month, year, 1, 7, year + 1) - 1;
}
// Token: 0x0400048B RID: 1163
private const int epoch = -1373427;
// Token: 0x02000171 RID: 369
public enum Month
{
// Token: 0x0400048D RID: 1165
nisan = 1,
// Token: 0x0400048E RID: 1166
iyyar,
// Token: 0x0400048F RID: 1167
sivan,
// Token: 0x04000490 RID: 1168
tammuz,
// Token: 0x04000491 RID: 1169
av,
// Token: 0x04000492 RID: 1170
elul,
// Token: 0x04000493 RID: 1171
tishri,
// Token: 0x04000494 RID: 1172
heshvan,
// Token: 0x04000495 RID: 1173
kislev,
// Token: 0x04000496 RID: 1174
teveth,
// Token: 0x04000497 RID: 1175
shevat,
// Token: 0x04000498 RID: 1176
adar,
// Token: 0x04000499 RID: 1177
adar_I = 12,
// Token: 0x0400049A RID: 1178
adar_II
}
}
}
@@ -0,0 +1,114 @@
using System;
namespace System.Globalization
{
// Token: 0x02000172 RID: 370
internal class CCHijriCalendar
{
// Token: 0x060011FC RID: 4604 RVA: 0x00046C20 File Offset: 0x00044E20
public static bool is_leap_year(int year)
{
return CCMath.mod(14 + 11 * year, 30) < 11;
}
// Token: 0x060011FD RID: 4605 RVA: 0x00046C34 File Offset: 0x00044E34
public static int fixed_from_dmy(int day, int month, int year)
{
int num = 227013;
num += 354 * (year - 1);
num += CCMath.div(3 + 11 * year, 30);
num += (int)Math.Ceiling(29.5 * (double)(month - 1));
return num + day;
}
// Token: 0x060011FE RID: 4606 RVA: 0x00046C80 File Offset: 0x00044E80
public static int year_from_fixed(int date)
{
return CCMath.div(30 * (date - 227014) + 10646, 10631);
}
// Token: 0x060011FF RID: 4607 RVA: 0x00046C9C File Offset: 0x00044E9C
public static void my_from_fixed(out int month, out int year, int date)
{
year = CCHijriCalendar.year_from_fixed(date);
int num = 1 + (int)Math.Ceiling((double)(date - 29 - CCHijriCalendar.fixed_from_dmy(1, 1, year)) / 29.5);
month = ((num >= 12) ? 12 : num);
}
// Token: 0x06001200 RID: 4608 RVA: 0x00046CE8 File Offset: 0x00044EE8
public static void dmy_from_fixed(out int day, out int month, out int year, int date)
{
CCHijriCalendar.my_from_fixed(out month, out year, date);
day = date - CCHijriCalendar.fixed_from_dmy(1, month, year) + 1;
}
// Token: 0x06001201 RID: 4609 RVA: 0x00046D04 File Offset: 0x00044F04
public static int month_from_fixed(int date)
{
int num;
int num2;
CCHijriCalendar.my_from_fixed(out num, out num2, date);
return num;
}
// Token: 0x06001202 RID: 4610 RVA: 0x00046D1C File Offset: 0x00044F1C
public static int day_from_fixed(int date)
{
int num;
int num2;
int num3;
CCHijriCalendar.dmy_from_fixed(out num, out num2, out num3, date);
return num;
}
// Token: 0x06001203 RID: 4611 RVA: 0x00046D38 File Offset: 0x00044F38
public static int date_difference(int dayA, int monthA, int yearA, int dayB, int monthB, int yearB)
{
return CCHijriCalendar.fixed_from_dmy(dayB, monthB, yearB) - CCHijriCalendar.fixed_from_dmy(dayA, monthA, yearA);
}
// Token: 0x06001204 RID: 4612 RVA: 0x00046D50 File Offset: 0x00044F50
public static int day_number(int day, int month, int year)
{
return CCHijriCalendar.date_difference(31, 12, year - 1, day, month, year);
}
// Token: 0x06001205 RID: 4613 RVA: 0x00046D64 File Offset: 0x00044F64
public static int days_remaining(int day, int month, int year)
{
return CCHijriCalendar.date_difference(day, month, year, 31, 12, year);
}
// Token: 0x0400049B RID: 1179
private const int epoch = 227014;
// Token: 0x02000173 RID: 371
public enum Month
{
// Token: 0x0400049D RID: 1181
muharram = 1,
// Token: 0x0400049E RID: 1182
safar,
// Token: 0x0400049F RID: 1183
rabi_I,
// Token: 0x040004A0 RID: 1184
rabi_II,
// Token: 0x040004A1 RID: 1185
jumada_I,
// Token: 0x040004A2 RID: 1186
jumada_II,
// Token: 0x040004A3 RID: 1187
rajab,
// Token: 0x040004A4 RID: 1188
shaban,
// Token: 0x040004A5 RID: 1189
ramadan,
// Token: 0x040004A6 RID: 1190
shawwal,
// Token: 0x040004A7 RID: 1191
dhu_al_quada,
// Token: 0x040004A8 RID: 1192
dhu_al_hijja
}
}
}
@@ -0,0 +1,133 @@
using System;
namespace System.Globalization
{
// Token: 0x0200016E RID: 366
internal class CCJulianCalendar
{
// Token: 0x060011DF RID: 4575 RVA: 0x000466B0 File Offset: 0x000448B0
public static bool is_leap_year(int year)
{
return CCMath.mod(year, 4) == ((year <= 0) ? 3 : 0);
}
// Token: 0x060011E0 RID: 4576 RVA: 0x000466CC File Offset: 0x000448CC
public static int fixed_from_dmy(int day, int month, int year)
{
int num = ((year >= 0) ? year : (year + 1));
int num2 = -2;
num2 += 365 * (num - 1);
num2 += CCMath.div(num - 1, 4);
num2 += CCMath.div(367 * month - 362, 12);
if (month > 2)
{
num2 += ((!CCJulianCalendar.is_leap_year(year)) ? (-2) : (-1));
}
return num2 + day;
}
// Token: 0x060011E1 RID: 4577 RVA: 0x00046740 File Offset: 0x00044940
public static int year_from_fixed(int date)
{
int num = CCMath.div(4 * (date - -1) + 1464, 1461);
return (num > 0) ? num : (num - 1);
}
// Token: 0x060011E2 RID: 4578 RVA: 0x00046774 File Offset: 0x00044974
public static void my_from_fixed(out int month, out int year, int date)
{
year = CCJulianCalendar.year_from_fixed(date);
int num = date - CCJulianCalendar.fixed_from_dmy(1, 1, year);
int num2;
if (date < CCJulianCalendar.fixed_from_dmy(1, 3, year))
{
num2 = 0;
}
else if (CCJulianCalendar.is_leap_year(year))
{
num2 = 1;
}
else
{
num2 = 2;
}
month = CCMath.div(12 * (num + num2) + 373, 367);
}
// Token: 0x060011E3 RID: 4579 RVA: 0x000467D8 File Offset: 0x000449D8
public static void dmy_from_fixed(out int day, out int month, out int year, int date)
{
CCJulianCalendar.my_from_fixed(out month, out year, date);
day = date - CCJulianCalendar.fixed_from_dmy(1, month, year) + 1;
}
// Token: 0x060011E4 RID: 4580 RVA: 0x000467F4 File Offset: 0x000449F4
public static int month_from_fixed(int date)
{
int num;
int num2;
CCJulianCalendar.my_from_fixed(out num, out num2, date);
return num;
}
// Token: 0x060011E5 RID: 4581 RVA: 0x0004680C File Offset: 0x00044A0C
public static int day_from_fixed(int date)
{
int num;
int num2;
int num3;
CCJulianCalendar.dmy_from_fixed(out num, out num2, out num3, date);
return num;
}
// Token: 0x060011E6 RID: 4582 RVA: 0x00046828 File Offset: 0x00044A28
public static int date_difference(int dayA, int monthA, int yearA, int dayB, int monthB, int yearB)
{
return CCJulianCalendar.fixed_from_dmy(dayB, monthB, yearB) - CCJulianCalendar.fixed_from_dmy(dayA, monthA, yearA);
}
// Token: 0x060011E7 RID: 4583 RVA: 0x00046840 File Offset: 0x00044A40
public static int day_number(int day, int month, int year)
{
return CCJulianCalendar.date_difference(31, 12, year - 1, day, month, year);
}
// Token: 0x060011E8 RID: 4584 RVA: 0x00046854 File Offset: 0x00044A54
public static int days_remaining(int day, int month, int year)
{
return CCJulianCalendar.date_difference(day, month, year, 31, 12, year);
}
// Token: 0x0400047D RID: 1149
private const int epoch = -1;
// Token: 0x0200016F RID: 367
public enum Month
{
// Token: 0x0400047F RID: 1151
january = 1,
// Token: 0x04000480 RID: 1152
february,
// Token: 0x04000481 RID: 1153
march,
// Token: 0x04000482 RID: 1154
april,
// Token: 0x04000483 RID: 1155
may,
// Token: 0x04000484 RID: 1156
june,
// Token: 0x04000485 RID: 1157
july,
// Token: 0x04000486 RID: 1158
august,
// Token: 0x04000487 RID: 1159
september,
// Token: 0x04000488 RID: 1160
october,
// Token: 0x04000489 RID: 1161
november,
// Token: 0x0400048A RID: 1162
december
}
}
}
+82
View File
@@ -0,0 +1,82 @@
using System;
namespace System.Globalization
{
// Token: 0x0200016A RID: 362
internal class CCMath
{
// Token: 0x060011B6 RID: 4534 RVA: 0x00046118 File Offset: 0x00044318
public static double round(double x)
{
return Math.Floor(x + 0.5);
}
// Token: 0x060011B7 RID: 4535 RVA: 0x0004612C File Offset: 0x0004432C
public static double mod(double x, double y)
{
return x - y * Math.Floor(x / y);
}
// Token: 0x060011B8 RID: 4536 RVA: 0x0004613C File Offset: 0x0004433C
public static int div(int x, int y)
{
return (int)Math.Floor((double)x / (double)y);
}
// Token: 0x060011B9 RID: 4537 RVA: 0x0004614C File Offset: 0x0004434C
public static int mod(int x, int y)
{
return x - y * CCMath.div(x, y);
}
// Token: 0x060011BA RID: 4538 RVA: 0x0004615C File Offset: 0x0004435C
public static int div_mod(out int remainder, int x, int y)
{
int num = CCMath.div(x, y);
remainder = x - y * num;
return num;
}
// Token: 0x060011BB RID: 4539 RVA: 0x0004617C File Offset: 0x0004437C
public static int signum(double x)
{
if (x < 0.0)
{
return -1;
}
if (x == 0.0)
{
return 0;
}
return 1;
}
// Token: 0x060011BC RID: 4540 RVA: 0x000461A4 File Offset: 0x000443A4
public static int signum(int x)
{
if (x < 0)
{
return -1;
}
if (x == 0)
{
return 0;
}
return 1;
}
// Token: 0x060011BD RID: 4541 RVA: 0x000461B8 File Offset: 0x000443B8
public static double amod(double x, double y)
{
double num = CCMath.mod(x, y);
return (num != 0.0) ? num : y;
}
// Token: 0x060011BE RID: 4542 RVA: 0x000461E4 File Offset: 0x000443E4
public static int amod(int x, int y)
{
int num = CCMath.mod(x, y);
return (num != 0) ? num : y;
}
}
}
+743
View File
@@ -0,0 +1,743 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Represents time in divisions, such as weeks, months, and years.</summary>
// Token: 0x02000167 RID: 359
[ComVisible(true)]
[Serializable]
public abstract class Calendar : ICloneable
{
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.Calendar" /> class.</summary>
// Token: 0x0600117A RID: 4474 RVA: 0x00045A90 File Offset: 0x00043C90
protected Calendar()
{
this.twoDigitYearMax = 99;
}
// Token: 0x170002FB RID: 763
// (get) Token: 0x0600117B RID: 4475 RVA: 0x00045AA0 File Offset: 0x00043CA0
internal virtual int M_DaysInWeek
{
get
{
return 7;
}
}
// Token: 0x0600117C RID: 4476 RVA: 0x00045AA4 File Offset: 0x00043CA4
internal string M_ValidValues(object a, object b)
{
StringWriter stringWriter = new StringWriter();
stringWriter.Write("Valid values are between {0} and {1}, inclusive.", a, b);
return stringWriter.ToString();
}
// Token: 0x0600117D RID: 4477 RVA: 0x00045ACC File Offset: 0x00043CCC
internal void M_ArgumentInRange(string param, int arg, int a, int b)
{
if (a <= arg && arg <= b)
{
return;
}
throw new ArgumentOutOfRangeException(param, this.M_ValidValues(a, b));
}
// Token: 0x0600117E RID: 4478 RVA: 0x00045AF8 File Offset: 0x00043CF8
internal void M_CheckHMSM(int hour, int minute, int second, int milliseconds)
{
this.M_ArgumentInRange("hour", hour, 0, 23);
this.M_ArgumentInRange("minute", minute, 0, 59);
this.M_ArgumentInRange("second", second, 0, 59);
this.M_ArgumentInRange("milliseconds", milliseconds, 0, 999999);
}
/// <summary>When overridden in a derived class, gets the list of eras in the current calendar.</summary>
/// <returns>An array of integers that represents the eras in the current calendar.</returns>
// Token: 0x170002FC RID: 764
// (get) Token: 0x0600117F RID: 4479
public abstract int[] Eras { get; }
/// <summary>Gets a value indicating whether the current calendar is solar-based, lunar-based, or a combination of both.</summary>
/// <returns>One of the <see cref="T:System.Globalization.CalendarAlgorithmType" /> values.</returns>
// Token: 0x170002FD RID: 765
// (get) Token: 0x06001180 RID: 4480 RVA: 0x00045B48 File Offset: 0x00043D48
[ComVisible(false)]
public virtual CalendarAlgorithmType AlgorithmType
{
get
{
return CalendarAlgorithmType.Unknown;
}
}
/// <summary>Gets the latest date and time supported by this <see cref="T:System.Globalization.Calendar" /> object.</summary>
/// <returns>The latest date and time supported by this calendar. The default is <see cref="F:System.DateTime.MaxValue" />.</returns>
// Token: 0x170002FE RID: 766
// (get) Token: 0x06001181 RID: 4481 RVA: 0x00045B4C File Offset: 0x00043D4C
[ComVisible(false)]
public virtual DateTime MaxSupportedDateTime
{
get
{
return DateTime.MaxValue;
}
}
/// <summary>Gets the earliest date and time supported by this <see cref="T:System.Globalization.Calendar" /> object.</summary>
/// <returns>The earliest date and time supported by this calendar. The default is <see cref="F:System.DateTime.MinValue" />.</returns>
// Token: 0x170002FF RID: 767
// (get) Token: 0x06001182 RID: 4482 RVA: 0x00045B54 File Offset: 0x00043D54
[ComVisible(false)]
public virtual DateTime MinSupportedDateTime
{
get
{
return DateTime.MinValue;
}
}
/// <summary>Creates a new object that is a copy of the current <see cref="T:System.Globalization.Calendar" /> object.</summary>
/// <returns>A new instance of <see cref="T:System.Object" /> that is the memberwise clone of the current <see cref="T:System.Globalization.Calendar" /> object.</returns>
// Token: 0x06001183 RID: 4483 RVA: 0x00045B5C File Offset: 0x00043D5C
[ComVisible(false)]
public virtual object Clone()
{
Calendar calendar = (Calendar)base.MemberwiseClone();
calendar.m_isReadOnly = false;
return calendar;
}
/// <summary>Calculates the leap month for a specified year.</summary>
/// <returns>A positive integer that indicates the leap month in the specified year.-or-Zero if this calendar does not support a leap month or if the <paramref name="year" /> parameter does not represent a leap year.</returns>
/// <param name="year">A year.</param>
// Token: 0x06001184 RID: 4484 RVA: 0x00045B80 File Offset: 0x00043D80
[ComVisible(false)]
public virtual int GetLeapMonth(int year)
{
return this.GetLeapMonth(year, this.GetEra(this.ToDateTime(year, 1, 1, 0, 0, 0, 0)));
}
/// <summary>Calculates the leap month for a specified year and era.</summary>
/// <returns>A positive integer that indicates the leap month in the specified year and era.-or-Zero if this calendar does not support a leap month or if the <paramref name="year" /> and <paramref name="era" /> parameters do not specify a leap year.</returns>
/// <param name="year">A year.</param>
/// <param name="era">An era.</param>
// Token: 0x06001185 RID: 4485 RVA: 0x00045BA8 File Offset: 0x00043DA8
[ComVisible(false)]
public virtual int GetLeapMonth(int year, int era)
{
int monthsInYear = this.GetMonthsInYear(year, era);
for (int i = 1; i <= monthsInYear; i++)
{
if (this.IsLeapMonth(year, i, era))
{
return i;
}
}
return 0;
}
/// <summary>Gets a value indicating whether this <see cref="T:System.Globalization.Calendar" /> object is read-only.</summary>
/// <returns>true if this <see cref="T:System.Globalization.Calendar" /> object is read-only; otherwise, false.</returns>
// Token: 0x17000300 RID: 768
// (get) Token: 0x06001186 RID: 4486 RVA: 0x00045BE4 File Offset: 0x00043DE4
[ComVisible(false)]
public bool IsReadOnly
{
get
{
return this.m_isReadOnly;
}
}
/// <summary>Returns a read-only version of the specified <see cref="T:System.Globalization.Calendar" /> object.</summary>
/// <returns>The <see cref="T:System.Globalization.Calendar" /> object specified by the <paramref name="calendar" /> parameter, if <paramref name="calendar" /> is read-only.-or-A read-only memberwise clone of the <see cref="T:System.Globalization.Calendar" /> object specified by <paramref name="calendar" />, if <paramref name="calendar" /> is not read-only.</returns>
/// <param name="calendar">A <see cref="T:System.Globalization.Calendar" /> object.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="calendar" /> is null.</exception>
// Token: 0x06001187 RID: 4487 RVA: 0x00045BEC File Offset: 0x00043DEC
[ComVisible(false)]
public static Calendar ReadOnly(Calendar calendar)
{
if (calendar.m_isReadOnly)
{
return calendar;
}
Calendar calendar2 = (Calendar)calendar.Clone();
calendar2.m_isReadOnly = true;
return calendar2;
}
// Token: 0x06001188 RID: 4488 RVA: 0x00045C1C File Offset: 0x00043E1C
internal void CheckReadOnly()
{
if (this.m_isReadOnly)
{
throw new InvalidOperationException("This Calendar is read-only.");
}
}
// Token: 0x17000301 RID: 769
// (get) Token: 0x06001189 RID: 4489 RVA: 0x00045C34 File Offset: 0x00043E34
internal virtual int M_MaxYear
{
get
{
if (this.M_MaxYearValue == 0)
{
this.M_MaxYearValue = this.GetYear(DateTime.MaxValue);
}
return this.M_MaxYearValue;
}
}
// Token: 0x0600118A RID: 4490 RVA: 0x00045C64 File Offset: 0x00043E64
internal virtual void M_CheckYE(int year, ref int era)
{
}
/// <summary>Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.</summary>
/// <returns>The last year of a 100-year range that can be represented by a 2-digit year.</returns>
/// <exception cref="T:System.InvalidOperationException">The current <see cref="T:System.Globalization.Calendar" /> object is read-only.</exception>
// Token: 0x17000302 RID: 770
// (get) Token: 0x0600118B RID: 4491 RVA: 0x00045C68 File Offset: 0x00043E68
// (set) Token: 0x0600118C RID: 4492 RVA: 0x00045C70 File Offset: 0x00043E70
public virtual int TwoDigitYearMax
{
get
{
return this.twoDigitYearMax;
}
set
{
this.CheckReadOnly();
this.M_ArgumentInRange("year", value, 100, this.M_MaxYear);
int num = 0;
this.M_CheckYE(value, ref num);
this.twoDigitYearMax = value;
}
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of days away from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of days to the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add days. </param>
/// <param name="days">The number of days to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range of this calendar. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="days" /> is outside the supported range of the <see cref="T:System.DateTime" /> return value. </exception>
// Token: 0x0600118D RID: 4493 RVA: 0x00045CAC File Offset: 0x00043EAC
public virtual DateTime AddDays(DateTime time, int days)
{
return time.Add(TimeSpan.FromDays((double)days));
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of hours away from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of hours to the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add hours. </param>
/// <param name="hours">The number of hours to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range of this calendar. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="hours" /> is outside the supported range of the <see cref="T:System.DateTime" /> return value. </exception>
// Token: 0x0600118E RID: 4494 RVA: 0x00045CBC File Offset: 0x00043EBC
public virtual DateTime AddHours(DateTime time, int hours)
{
return time.Add(TimeSpan.FromHours((double)hours));
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of milliseconds away from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of milliseconds to the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to add milliseconds to. </param>
/// <param name="milliseconds">The number of milliseconds to add.</param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range of this calendar. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="milliseconds" /> is outside the supported range of the <see cref="T:System.DateTime" /> return value. </exception>
// Token: 0x0600118F RID: 4495 RVA: 0x00045CCC File Offset: 0x00043ECC
public virtual DateTime AddMilliseconds(DateTime time, double milliseconds)
{
return time.Add(TimeSpan.FromMilliseconds(milliseconds));
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of minutes away from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of minutes to the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add minutes. </param>
/// <param name="minutes">The number of minutes to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range of this calendar. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="minutes" /> is outside the supported range of the <see cref="T:System.DateTime" /> return value. </exception>
// Token: 0x06001190 RID: 4496 RVA: 0x00045CDC File Offset: 0x00043EDC
public virtual DateTime AddMinutes(DateTime time, int minutes)
{
return time.Add(TimeSpan.FromMinutes((double)minutes));
}
/// <summary>When overridden in a derived class, returns a <see cref="T:System.DateTime" /> that is the specified number of months away from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of months to the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add months. </param>
/// <param name="months">The number of months to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range of this calendar. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="months" /> is outside the supported range of the <see cref="T:System.DateTime" /> return value. </exception>
// Token: 0x06001191 RID: 4497
public abstract DateTime AddMonths(DateTime time, int months);
/// <summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of seconds away from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of seconds to the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add seconds. </param>
/// <param name="seconds">The number of seconds to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range of this calendar. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="seconds" /> is outside the supported range of the <see cref="T:System.DateTime" /> return value. </exception>
// Token: 0x06001192 RID: 4498 RVA: 0x00045CEC File Offset: 0x00043EEC
public virtual DateTime AddSeconds(DateTime time, int seconds)
{
return time.Add(TimeSpan.FromSeconds((double)seconds));
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of weeks away from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of weeks to the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add weeks. </param>
/// <param name="weeks">The number of weeks to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range of this calendar. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="weeks" /> is outside the supported range of the <see cref="T:System.DateTime" /> return value. </exception>
// Token: 0x06001193 RID: 4499 RVA: 0x00045CFC File Offset: 0x00043EFC
public virtual DateTime AddWeeks(DateTime time, int weeks)
{
return time.AddDays((double)(weeks * this.M_DaysInWeek));
}
/// <summary>When overridden in a derived class, returns a <see cref="T:System.DateTime" /> that is the specified number of years away from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of years to the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add years. </param>
/// <param name="years">The number of years to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range of this calendar. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="years" /> is outside the supported range of the <see cref="T:System.DateTime" /> return value. </exception>
// Token: 0x06001194 RID: 4500
public abstract DateTime AddYears(DateTime time, int years);
/// <summary>When overridden in a derived class, returns the day of the month in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>A positive integer that represents the day of the month in the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x06001195 RID: 4501
public abstract int GetDayOfMonth(DateTime time);
/// <summary>When overridden in a derived class, returns the day of the week in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>A <see cref="T:System.DayOfWeek" /> value that represents the day of the week in the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x06001196 RID: 4502
public abstract DayOfWeek GetDayOfWeek(DateTime time);
/// <summary>When overridden in a derived class, returns the day of the year in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>A positive integer that represents the day of the year in the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x06001197 RID: 4503
public abstract int GetDayOfYear(DateTime time);
/// <summary>Returns the number of days in the specified month and year of the current era.</summary>
/// <returns>The number of days in the specified month in the specified year in the current era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">A positive integer that represents the month. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar. </exception>
// Token: 0x06001198 RID: 4504 RVA: 0x00045D10 File Offset: 0x00043F10
public virtual int GetDaysInMonth(int year, int month)
{
return this.GetDaysInMonth(year, month, 0);
}
/// <summary>When overridden in a derived class, returns the number of days in the specified month, year, and era.</summary>
/// <returns>The number of days in the specified month in the specified year in the specified era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">A positive integer that represents the month. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x06001199 RID: 4505
public abstract int GetDaysInMonth(int year, int month, int era);
/// <summary>Returns the number of days in the specified year of the current era.</summary>
/// <returns>The number of days in the specified year in the current era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar. </exception>
// Token: 0x0600119A RID: 4506 RVA: 0x00045D1C File Offset: 0x00043F1C
public virtual int GetDaysInYear(int year)
{
return this.GetDaysInYear(year, 0);
}
/// <summary>When overridden in a derived class, returns the number of days in the specified year and era.</summary>
/// <returns>The number of days in the specified year in the specified era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x0600119B RID: 4507
public abstract int GetDaysInYear(int year, int era);
/// <summary>When overridden in a derived class, returns the era in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer that represents the era in <paramref name="time" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x0600119C RID: 4508
public abstract int GetEra(DateTime time);
/// <summary>Returns the hours value in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 0 to 23 that represents the hour in <paramref name="time" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x0600119D RID: 4509 RVA: 0x00045D28 File Offset: 0x00043F28
public virtual int GetHour(DateTime time)
{
return time.TimeOfDay.Hours;
}
/// <summary>Returns the milliseconds value in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>A double-precision floating-point number from 0 to 999 that represents the milliseconds in the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x0600119E RID: 4510 RVA: 0x00045D44 File Offset: 0x00043F44
public virtual double GetMilliseconds(DateTime time)
{
return (double)time.TimeOfDay.Milliseconds;
}
/// <summary>Returns the minutes value in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 0 to 59 that represents the minutes in <paramref name="time" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x0600119F RID: 4511 RVA: 0x00045D64 File Offset: 0x00043F64
public virtual int GetMinute(DateTime time)
{
return time.TimeOfDay.Minutes;
}
/// <summary>When overridden in a derived class, returns the month in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>A positive integer that represents the month in <paramref name="time" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060011A0 RID: 4512
public abstract int GetMonth(DateTime time);
/// <summary>Returns the number of months in the specified year in the current era.</summary>
/// <returns>The number of months in the specified year in the current era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar. </exception>
// Token: 0x060011A1 RID: 4513 RVA: 0x00045D80 File Offset: 0x00043F80
public virtual int GetMonthsInYear(int year)
{
return this.GetMonthsInYear(year, 0);
}
/// <summary>When overridden in a derived class, returns the number of months in the specified year in the specified era.</summary>
/// <returns>The number of months in the specified year in the specified era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060011A2 RID: 4514
public abstract int GetMonthsInYear(int year, int era);
/// <summary>Returns the seconds value in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 0 to 59 that represents the seconds in <paramref name="time" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060011A3 RID: 4515 RVA: 0x00045D8C File Offset: 0x00043F8C
public virtual int GetSecond(DateTime time)
{
return time.TimeOfDay.Seconds;
}
// Token: 0x060011A4 RID: 4516 RVA: 0x00045DA8 File Offset: 0x00043FA8
internal int M_DiffDays(DateTime timeA, DateTime timeB)
{
long num = timeA.Ticks - timeB.Ticks;
if (num >= 0L)
{
return (int)(num / 864000000000L);
}
num += 1L;
return -1 + (int)(num / 864000000000L);
}
// Token: 0x060011A5 RID: 4517 RVA: 0x00045DF0 File Offset: 0x00043FF0
internal DateTime M_GetFirstDayOfSecondWeekOfYear(int year, CalendarWeekRule rule, DayOfWeek firstDayOfWeek)
{
DateTime dateTime = this.ToDateTime(year, 1, 1, 0, 0, 0, 0);
int dayOfWeek = (int)this.GetDayOfWeek(dateTime);
int num = 0;
switch (rule)
{
case CalendarWeekRule.FirstDay:
if (firstDayOfWeek > (DayOfWeek)dayOfWeek)
{
num += firstDayOfWeek - (DayOfWeek)dayOfWeek;
}
else
{
num += firstDayOfWeek + this.M_DaysInWeek - (DayOfWeek)dayOfWeek;
}
break;
case CalendarWeekRule.FirstFullWeek:
num = this.M_DaysInWeek;
if (firstDayOfWeek >= (DayOfWeek)dayOfWeek)
{
num += firstDayOfWeek - (DayOfWeek)dayOfWeek;
}
else
{
num += firstDayOfWeek + this.M_DaysInWeek - (DayOfWeek)dayOfWeek;
}
break;
case CalendarWeekRule.FirstFourDayWeek:
{
int num2 = (dayOfWeek + 3) % this.M_DaysInWeek;
num = 3;
if (firstDayOfWeek > (DayOfWeek)num2)
{
num += firstDayOfWeek - (DayOfWeek)num2;
}
else
{
num += firstDayOfWeek + this.M_DaysInWeek - (DayOfWeek)num2;
}
break;
}
}
return this.AddDays(dateTime, num);
}
/// <summary>Returns the week of the year that includes the date in the specified <see cref="T:System.DateTime" /> value.</summary>
/// <returns>A positive integer that represents the week of the year that includes the date in the <paramref name="time" /> parameter.</returns>
/// <param name="time">A date and time value.</param>
/// <param name="rule">An enumeration value that defines a calendar week. </param>
/// <param name="firstDayOfWeek">An enumeration value that represents the first day of the week. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="time" /> is earlier than <see cref="P:System.Globalization.Calendar.MinSupportedDateTime" /> or later than <see cref="P:System.Globalization.Calendar.MaxSupportedDateTime" />.-or-<paramref name="firstDayOfWeek" /> is not a valid <see cref="T:System.DayOfWeek" /> value.-or- <paramref name="rule" /> is not a valid <see cref="T:System.Globalization.CalendarWeekRule" /> value. </exception>
// Token: 0x060011A6 RID: 4518 RVA: 0x00045EC0 File Offset: 0x000440C0
public virtual int GetWeekOfYear(DateTime time, CalendarWeekRule rule, DayOfWeek firstDayOfWeek)
{
if (firstDayOfWeek < DayOfWeek.Sunday || DayOfWeek.Saturday < firstDayOfWeek)
{
throw new ArgumentOutOfRangeException("firstDayOfWeek", "Value is not a valid day of week.");
}
int num = this.GetYear(time);
int num2;
for (;;)
{
DateTime dateTime = this.M_GetFirstDayOfSecondWeekOfYear(num, rule, firstDayOfWeek);
num2 = this.M_DiffDays(time, dateTime) + this.M_DaysInWeek;
if (num2 >= 0)
{
break;
}
num--;
}
return 1 + num2 / this.M_DaysInWeek;
}
/// <summary>When overridden in a derived class, returns the year in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer that represents the year in <paramref name="time" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060011A7 RID: 4519
public abstract int GetYear(DateTime time);
/// <summary>Determines whether the specified date in the current era is a leap day.</summary>
/// <returns>true if the specified day is a leap day; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">A positive integer that represents the month. </param>
/// <param name="day">A positive integer that represents the day. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="day" /> is outside the range supported by the calendar. </exception>
// Token: 0x060011A8 RID: 4520 RVA: 0x00045F2C File Offset: 0x0004412C
public virtual bool IsLeapDay(int year, int month, int day)
{
return this.IsLeapDay(year, month, day, 0);
}
/// <summary>When overridden in a derived class, determines whether the specified date in the specified era is a leap day.</summary>
/// <returns>true if the specified day is a leap day; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">A positive integer that represents the month. </param>
/// <param name="day">A positive integer that represents the day. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="day" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060011A9 RID: 4521
public abstract bool IsLeapDay(int year, int month, int day, int era);
/// <summary>Determines whether the specified month in the specified year in the current era is a leap month.</summary>
/// <returns>true if the specified month is a leap month; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">A positive integer that represents the month. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar. </exception>
// Token: 0x060011AA RID: 4522 RVA: 0x00045F38 File Offset: 0x00044138
public virtual bool IsLeapMonth(int year, int month)
{
return this.IsLeapMonth(year, month, 0);
}
/// <summary>When overridden in a derived class, determines whether the specified month in the specified year in the specified era is a leap month.</summary>
/// <returns>true if the specified month is a leap month; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">A positive integer that represents the month. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060011AB RID: 4523
public abstract bool IsLeapMonth(int year, int month, int era);
/// <summary>Determines whether the specified year in the current era is a leap year.</summary>
/// <returns>true if the specified year is a leap year; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar. </exception>
// Token: 0x060011AC RID: 4524 RVA: 0x00045F44 File Offset: 0x00044144
public virtual bool IsLeapYear(int year)
{
return this.IsLeapYear(year, 0);
}
/// <summary>When overridden in a derived class, determines whether the specified year in the specified era is a leap year.</summary>
/// <returns>true if the specified year is a leap year; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060011AD RID: 4525
public abstract bool IsLeapYear(int year, int era);
/// <summary>Returns a <see cref="T:System.DateTime" /> that is set to the specified date and time in the current era.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that is set to the specified date and time in the current era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">A positive integer that represents the month. </param>
/// <param name="day">A positive integer that represents the day. </param>
/// <param name="hour">An integer from 0 to 23 that represents the hour. </param>
/// <param name="minute">An integer from 0 to 59 that represents the minute. </param>
/// <param name="second">An integer from 0 to 59 that represents the second. </param>
/// <param name="millisecond">An integer from 0 to 999 that represents the millisecond. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="day" /> is outside the range supported by the calendar.-or- <paramref name="hour" /> is less than zero or greater than 23.-or- <paramref name="minute" /> is less than zero or greater than 59.-or- <paramref name="second" /> is less than zero or greater than 59.-or- <paramref name="millisecond" /> is less than zero or greater than 999. </exception>
// Token: 0x060011AE RID: 4526 RVA: 0x00045F50 File Offset: 0x00044150
public virtual DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond)
{
return this.ToDateTime(year, month, day, hour, minute, second, millisecond, 0);
}
/// <summary>When overridden in a derived class, returns a <see cref="T:System.DateTime" /> that is set to the specified date and time in the specified era.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that is set to the specified date and time in the current era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">A positive integer that represents the month. </param>
/// <param name="day">A positive integer that represents the day. </param>
/// <param name="hour">An integer from 0 to 23 that represents the hour. </param>
/// <param name="minute">An integer from 0 to 59 that represents the minute. </param>
/// <param name="second">An integer from 0 to 59 that represents the second. </param>
/// <param name="millisecond">An integer from 0 to 999 that represents the millisecond. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="day" /> is outside the range supported by the calendar.-or- <paramref name="hour" /> is less than zero or greater than 23.-or- <paramref name="minute" /> is less than zero or greater than 59.-or- <paramref name="second" /> is less than zero or greater than 59.-or- <paramref name="millisecond" /> is less than zero or greater than 999.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060011AF RID: 4527
public abstract DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era);
/// <summary>Converts the specified year to a four-digit year by using the <see cref="P:System.Globalization.Calendar.TwoDigitYearMax" /> property to determine the appropriate century.</summary>
/// <returns>An integer that contains the four-digit representation of <paramref name="year" />.</returns>
/// <param name="year">A two-digit or four-digit integer that represents the year to convert. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar. </exception>
// Token: 0x060011B0 RID: 4528 RVA: 0x00045F70 File Offset: 0x00044170
public virtual int ToFourDigitYear(int year)
{
if (year < 0)
{
throw new ArgumentOutOfRangeException("year", "Non-negative number required.");
}
if (year <= 99)
{
int num = this.TwoDigitYearMax % 100;
int num2 = year - num;
year = this.TwoDigitYearMax + num2 + ((num2 > 0) ? (-100) : 0);
}
int num3 = 0;
this.M_CheckYE(year, ref num3);
return year;
}
// Token: 0x17000303 RID: 771
// (get) Token: 0x060011B1 RID: 4529 RVA: 0x00045FD0 File Offset: 0x000441D0
// (set) Token: 0x060011B2 RID: 4530 RVA: 0x00046010 File Offset: 0x00044210
internal string[] AbbreviatedEraNames
{
get
{
if (this.M_AbbrEraNames == null || this.M_AbbrEraNames.Length != this.Eras.Length)
{
throw new Exception("Internal: M_AbbrEraNames wrong initialized!");
}
return (string[])this.M_AbbrEraNames.Clone();
}
set
{
this.CheckReadOnly();
if (value.Length != this.Eras.Length)
{
StringWriter stringWriter = new StringWriter();
stringWriter.Write("Array length must be equal Eras length {0}.", this.Eras.Length);
throw new ArgumentException(stringWriter.ToString());
}
this.M_AbbrEraNames = (string[])value.Clone();
}
}
// Token: 0x17000304 RID: 772
// (get) Token: 0x060011B3 RID: 4531 RVA: 0x00046070 File Offset: 0x00044270
// (set) Token: 0x060011B4 RID: 4532 RVA: 0x000460B0 File Offset: 0x000442B0
internal string[] EraNames
{
get
{
if (this.M_EraNames == null || this.M_EraNames.Length != this.Eras.Length)
{
throw new Exception("Internal: M_EraNames not initialized!");
}
return (string[])this.M_EraNames.Clone();
}
set
{
this.CheckReadOnly();
if (value.Length != this.Eras.Length)
{
StringWriter stringWriter = new StringWriter();
stringWriter.Write("Array length must be equal Eras length {0}.", this.Eras.Length);
throw new ArgumentException(stringWriter.ToString());
}
this.M_EraNames = (string[])value.Clone();
}
}
/// <summary>Represents the current era of the current calendar. </summary>
// Token: 0x0400045F RID: 1119
public const int CurrentEra = 0;
// Token: 0x04000460 RID: 1120
[NonSerialized]
private bool m_isReadOnly;
// Token: 0x04000461 RID: 1121
[NonSerialized]
internal int twoDigitYearMax;
// Token: 0x04000462 RID: 1122
[NonSerialized]
private int M_MaxYearValue;
// Token: 0x04000463 RID: 1123
[NonSerialized]
internal string[] M_AbbrEraNames;
// Token: 0x04000464 RID: 1124
[NonSerialized]
internal string[] M_EraNames;
// Token: 0x04000465 RID: 1125
internal int m_currentEraValue;
}
}
@@ -0,0 +1,24 @@
using System;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Specifies whether a calendar is solar-based, lunar-based, or lunisolar-based.</summary>
// Token: 0x02000168 RID: 360
[ComVisible(true)]
public enum CalendarAlgorithmType
{
/// <summary>An unknown calendar basis.</summary>
// Token: 0x04000467 RID: 1127
Unknown,
/// <summary>A solar-based calendar.</summary>
// Token: 0x04000468 RID: 1128
SolarCalendar,
/// <summary>A lunar-based calendar.</summary>
// Token: 0x04000469 RID: 1129
LunarCalendar,
/// <summary>A lunisolar-based calendar.</summary>
// Token: 0x0400046A RID: 1130
LunisolarCalendar
}
}
@@ -0,0 +1,22 @@
using System;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Defines different rules for determining the first week of the year.</summary>
// Token: 0x02000169 RID: 361
[ComVisible(true)]
[Serializable]
public enum CalendarWeekRule
{
/// <summary>Indicates that the first week of the year starts on the first day of the year and ends before the following designated first day of the week. The value is 0.</summary>
// Token: 0x0400046C RID: 1132
FirstDay,
/// <summary>Indicates that the first week of the year begins on the first occurrence of the designated first day of the week on or after the first day of the year. The value is 1.</summary>
// Token: 0x0400046D RID: 1133
FirstFullWeek,
/// <summary>Indicates that the first week of the year is the first week with four or more days before the designated first day of the week. The value is 2.</summary>
// Token: 0x0400046E RID: 1134
FirstFourDayWeek
}
}
@@ -0,0 +1,473 @@
using System;
namespace System.Globalization
{
/// <summary>Retrieves information about a Unicode character. This class cannot be inherited.</summary>
// Token: 0x02000179 RID: 377
public sealed class CharUnicodeInfo
{
// Token: 0x06001231 RID: 4657 RVA: 0x00047624 File Offset: 0x00045824
private CharUnicodeInfo()
{
}
/// <summary>Gets the decimal digit value of the specified numeric character.</summary>
/// <returns>The decimal digit value of the specified numeric character.-or- -1, if the specified character is not a decimal digit.</returns>
/// <param name="ch">The Unicode character for which to get the decimal digit value. </param>
// Token: 0x06001232 RID: 4658 RVA: 0x0004762C File Offset: 0x0004582C
public static int GetDecimalDigitValue(char ch)
{
if (ch == '²')
{
return 2;
}
if (ch == '³')
{
return 3;
}
if (ch == '¹')
{
return 1;
}
if (ch == '⁰')
{
return 0;
}
if ('⁴' <= ch && ch < '⁺')
{
return (int)(ch - '⁰');
}
if ('₀' <= ch && ch < '₊')
{
return (int)(ch - '₀');
}
if (!char.IsDigit(ch))
{
return -1;
}
if (ch < ':')
{
return (int)(ch - '0');
}
if (ch < '٪')
{
return (int)(ch - '٠');
}
if (ch < 'ۺ')
{
return (int)(ch - '۰');
}
if (ch < '॰')
{
return (int)(ch - '');
}
if (ch < 'ৰ')
{
return (int)(ch - '');
}
if (ch < '\u0a70')
{
return (int)(ch - '');
}
if (ch < '૰')
{
return (int)(ch - '');
}
if (ch < '୰')
{
return (int)(ch - '');
}
if (ch < '௰')
{
return (int)(ch - '');
}
if (ch < '\u0c70')
{
return (int)(ch - '');
}
if (ch < '\u0cf0')
{
return (int)(ch - '');
}
if (ch < '൰')
{
return (int)(ch - '');
}
if (ch < '๚')
{
return (int)(ch - '');
}
if (ch < '\u0eda')
{
return (int)(ch - '');
}
if (ch < '༪')
{
return (int)(ch - '༠');
}
if (ch < '၊')
{
return (int)(ch - '');
}
if (ch < '፲')
{
return (int)(ch - '፨');
}
if (ch < '\u17ea')
{
return (int)(ch - '០');
}
if (ch < '\u181a')
{
return (int)(ch - '᠐');
}
if (ch < '⁺')
{
return (int)(ch - '⁰');
}
if (ch < '₊')
{
return (int)(ch - '₀');
}
if (ch < '')
{
return -1;
}
if (ch < '')
{
return (int)(ch - '');
}
return -1;
}
/// <summary>Gets the decimal digit value of the numeric character at the specified index of the specified string.</summary>
/// <returns>The decimal digit value of the numeric character at the specified index of the specified string.-or- -1, if the character at the specified index of the specified string is not a decimal digit.</returns>
/// <param name="s">The <see cref="T:System.String" /> containing the Unicode character for which to get the decimal digit value. </param>
/// <param name="index">The index of the Unicode character for which to get the decimal digit value. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="s" /> is null. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="index" /> is outside the range of valid indexes in <paramref name="s" />. </exception>
// Token: 0x06001233 RID: 4659 RVA: 0x0004786C File Offset: 0x00045A6C
public static int GetDecimalDigitValue(string s, int index)
{
if (s == null)
{
throw new ArgumentNullException("s");
}
return CharUnicodeInfo.GetDecimalDigitValue(s[index]);
}
/// <summary>Gets the digit value of the specified numeric character.</summary>
/// <returns>The digit value of the specified numeric character.-or- -1, if the specified character is not a digit.</returns>
/// <param name="ch">The Unicode character for which to get the digit value. </param>
// Token: 0x06001234 RID: 4660 RVA: 0x0004788C File Offset: 0x00045A8C
public static int GetDigitValue(char ch)
{
int decimalDigitValue = CharUnicodeInfo.GetDecimalDigitValue(ch);
if (decimalDigitValue >= 0)
{
return decimalDigitValue;
}
if (ch == '⓪')
{
return 0;
}
if (ch >= '①' && ch < '⑩')
{
return (int)(ch - '\u245f');
}
if (ch >= '⑴' && ch < '⑽')
{
return (int)(ch - '⑳');
}
if (ch >= '⒈' && ch < '⒑')
{
return (int)(ch - '⒇');
}
if (ch >= '⓵' && ch < '⓾')
{
return (int)(ch - '⓴');
}
if (ch >= '❶' && ch < '❿')
{
return (int)(ch - '');
}
if (ch >= '➀' && ch < '➉')
{
return (int)(ch - '❿');
}
if (ch >= '➊' && ch < '➓')
{
return (int)(ch - '➉');
}
return -1;
}
/// <summary>Gets the digit value of the numeric character at the specified index of the specified string.</summary>
/// <returns>The digit value of the numeric character at the specified index of the specified string.-or- -1, if the character at the specified index of the specified string is not a digit.</returns>
/// <param name="s">The <see cref="T:System.String" /> containing the Unicode character for which to get the digit value. </param>
/// <param name="index">The index of the Unicode character for which to get the digit value. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="s" /> is null. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="index" /> is outside the range of valid indexes in <paramref name="s" />. </exception>
// Token: 0x06001235 RID: 4661 RVA: 0x0004798C File Offset: 0x00045B8C
public static int GetDigitValue(string s, int index)
{
if (s == null)
{
throw new ArgumentNullException("s");
}
return CharUnicodeInfo.GetDigitValue(s[index]);
}
/// <summary>Gets the numeric value associated with the specified character.</summary>
/// <returns>The numeric value associated with the specified character.-or- -1, if the specified character is not a numeric character.</returns>
/// <param name="ch">The Unicode character for which to get the numeric value. </param>
// Token: 0x06001236 RID: 4662 RVA: 0x000479AC File Offset: 0x00045BAC
public static double GetNumericValue(char ch)
{
int digitValue = CharUnicodeInfo.GetDigitValue(ch);
if (digitValue >= 0)
{
return (double)digitValue;
}
switch (ch)
{
case '⅓':
return 0.3333333333333333;
case '⅔':
return 0.6666666666666666;
default:
switch (ch)
{
case '':
return 50.0;
case '':
return 100.0;
case '':
return 500.0;
case 'ⅿ':
return 1000.0;
case 'ↀ':
return 1000.0;
case 'ↁ':
return 5000.0;
case 'ↂ':
return 10000.0;
default:
switch (ch)
{
case '৴':
return 1.0;
case '৵':
return 2.0;
case '৶':
return 3.0;
case '৷':
return 4.0;
default:
switch (ch)
{
case '':
return 50.0;
case '':
return 100.0;
case '':
return 500.0;
case '':
return 1000.0;
default:
switch (ch)
{
case '¼':
return 0.25;
case '½':
return 0.5;
case '¾':
return 0.75;
default:
switch (ch)
{
case '௰':
return 10.0;
case '௱':
return 100.0;
case '௲':
return 1000.0;
default:
switch (ch)
{
case 'ᛮ':
return 17.0;
case 'ᛯ':
return 18.0;
case 'ᛰ':
return 19.0;
default:
switch (ch)
{
case '〸':
return 10.0;
case '〹':
return 20.0;
case '〺':
return 30.0;
default:
if (ch == '፼')
{
return 10000.0;
}
if (ch == '⓾' || ch == '❿' || ch == '➉' || ch == '➓')
{
return 10.0;
}
if (ch == '')
{
return 0.0;
}
if ('⓫' <= ch && ch < '⓵')
{
return (double)(ch - 'ⓠ');
}
if ('〡' <= ch && ch < '\u302a')
{
return (double)(ch - '〠');
}
if ('㉑' <= ch && ch < '㉠')
{
return (double)(ch - '㈼');
}
if ('㊱' <= ch && ch < '㋀')
{
return (double)(ch - '㊍');
}
if (!char.IsNumber(ch))
{
return -1.0;
}
if (ch < '༳')
{
return 0.5 + (double)ch - 3882.0;
}
if (ch < '፼')
{
return (double)((ch - '፱') * '\n');
}
if (ch < '⅙')
{
return 0.2 * (double)(ch - '⅔');
}
if (ch < '')
{
return (double)(ch - '⅟');
}
if (ch < '')
{
return (double)(ch - '');
}
if (ch < '⑴')
{
return (double)(ch - '\u245f');
}
if (ch < '⒈')
{
return (double)(ch - '⑳');
}
if (ch < '⒜')
{
return (double)(ch - '⒇');
}
if (ch < '㆖')
{
return (double)(ch - '㆑');
}
if (ch < '㈪')
{
return (double)(ch - '\u321f');
}
if (ch < '㊊')
{
return (double)(ch - '㉿');
}
return -1.0;
}
break;
}
break;
}
break;
}
break;
}
break;
case '৹':
return 16.0;
}
break;
}
break;
case '⅙':
return 0.16666666666666666;
case '⅚':
return 0.8333333333333334;
case '⅛':
return 0.125;
case '⅜':
return 0.375;
case '⅝':
return 0.625;
case '⅞':
return 0.875;
case '⅟':
return 1.0;
}
}
/// <summary>Gets the numeric value associated with the character at the specified index of the specified string.</summary>
/// <returns>The numeric value associated with the character at the specified index of the specified string.-or- -1, if the character at the specified index of the specified string is not a numeric character.</returns>
/// <param name="s">The <see cref="T:System.String" /> containing the Unicode character for which to get the numeric value. </param>
/// <param name="index">The index of the Unicode character for which to get the numeric value. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="s" /> is null. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="index" /> is outside the range of valid indexes in <paramref name="s" />. </exception>
// Token: 0x06001237 RID: 4663 RVA: 0x00047E40 File Offset: 0x00046040
public static double GetNumericValue(string s, int index)
{
if (s == null)
{
throw new ArgumentNullException("s");
}
return CharUnicodeInfo.GetNumericValue(s[index]);
}
/// <summary>Gets the Unicode category of the specified character.</summary>
/// <returns>A <see cref="T:System.Globalization.UnicodeCategory" /> value indicating the category of the specified character.</returns>
/// <param name="ch">The Unicode character for which to get the Unicode category. </param>
// Token: 0x06001238 RID: 4664 RVA: 0x00047E60 File Offset: 0x00046060
public static UnicodeCategory GetUnicodeCategory(char ch)
{
return char.GetUnicodeCategory(ch);
}
/// <summary>Gets the Unicode category of the character at the specified index of the specified string.</summary>
/// <returns>A <see cref="T:System.Globalization.UnicodeCategory" /> value indicating the category of the character at the specified index of the specified string.</returns>
/// <param name="s">The <see cref="T:System.String" /> containing the Unicode character for which to get the Unicode category. </param>
/// <param name="index">The index of the Unicode character for which to get the Unicode category. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="s" /> is null. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="index" /> is outside the range of valid indexes in <paramref name="s" />. </exception>
// Token: 0x06001239 RID: 4665 RVA: 0x00047E68 File Offset: 0x00046068
public static UnicodeCategory GetUnicodeCategory(string s, int index)
{
if (s == null)
{
throw new ArgumentNullException("s");
}
return char.GetUnicodeCategory(s, index);
}
}
}
@@ -0,0 +1,92 @@
using System;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Represents time in divisions, such as months, days, and years. Years are calculated using the Chinese calendar, while days and months are calculated using the lunisolar calendar.</summary>
// Token: 0x0200017A RID: 378
[Serializable]
public class ChineseLunisolarCalendar : EastAsianLunisolarCalendar
{
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.ChineseLunisolarCalendar" /> class. </summary>
// Token: 0x0600123A RID: 4666 RVA: 0x00047E84 File Offset: 0x00046084
[MonoTODO]
public ChineseLunisolarCalendar()
: base(ChineseLunisolarCalendar.era_handler)
{
}
// Token: 0x0600123B RID: 4667 RVA: 0x00047E94 File Offset: 0x00046094
static ChineseLunisolarCalendar()
{
ChineseLunisolarCalendar.era_handler.appendEra(1, CCFixed.FromDateTime(new DateTime(1, 1, 1)));
}
/// <summary>Gets the eras that correspond to the range of dates and times supported by the current <see cref="T:System.Globalization.ChineseLunisolarCalendar" /> object.</summary>
/// <returns>An array of 32-bit signed integers that specify the relevant eras. The return value for a <see cref="T:System.Globalization.ChineseLunisolarCalendar" /> object is always an array containing one element equal to the <see cref="F:System.Globalization.ChineseLunisolarCalendar.ChineseEra" /> value.</returns>
// Token: 0x17000309 RID: 777
// (get) Token: 0x0600123C RID: 4668 RVA: 0x00047EF4 File Offset: 0x000460F4
[ComVisible(false)]
public override int[] Eras
{
get
{
return (int[])ChineseLunisolarCalendar.era_handler.Eras.Clone();
}
}
/// <summary>Retrieves the era that corresponds to the specified <see cref="T:System.DateTime" /> type.</summary>
/// <returns>An integer that represents the era in the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> type to read. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="time" /> is less than <see cref="P:System.Globalization.ChineseLunisolarCalendar.MinSupportedDateTime" /> or greater than <see cref="P:System.Globalization.ChineseLunisolarCalendar.MaxSupportedDateTime" />.</exception>
// Token: 0x0600123D RID: 4669 RVA: 0x00047F0C File Offset: 0x0004610C
[ComVisible(false)]
public override int GetEra(DateTime time)
{
int num = CCFixed.FromDateTime(time);
int num2;
ChineseLunisolarCalendar.era_handler.EraYear(out num2, num);
return num2;
}
/// <summary>Gets the minimum date and time supported by the <see cref="T:System.Globalization.ChineseLunisolarCalendar" /> class.</summary>
/// <returns>A <see cref="T:System.DateTime" /> type that represents February 19, 1901 in the Gregorian calendar, which is equivalent to the constructor, DateTime(1901, 2, 19).</returns>
// Token: 0x1700030A RID: 778
// (get) Token: 0x0600123E RID: 4670 RVA: 0x00047F30 File Offset: 0x00046130
[ComVisible(false)]
public override DateTime MinSupportedDateTime
{
get
{
return ChineseLunisolarCalendar.ChineseMin;
}
}
/// <summary>Gets the maximum date and time supported by the <see cref="T:System.Globalization.ChineseLunisolarCalendar" /> class.</summary>
/// <returns>A <see cref="T:System.DateTime" /> type that represents the last moment on January 28, 2101 in the Gregorian calendar, which is approximately equal to the constructor DateTime(2101, 1, 28, 23, 59, 59, 999).</returns>
// Token: 0x1700030B RID: 779
// (get) Token: 0x0600123F RID: 4671 RVA: 0x00047F38 File Offset: 0x00046138
[ComVisible(false)]
public override DateTime MaxSupportedDateTime
{
get
{
return ChineseLunisolarCalendar.ChineseMax;
}
}
/// <summary>Specifies the era that corresponds to the current <see cref="T:System.Globalization.ChineseLunisolarCalendar" /> object.</summary>
// Token: 0x040004B6 RID: 1206
public const int ChineseEra = 1;
// Token: 0x040004B7 RID: 1207
internal static readonly CCEastAsianLunisolarEraHandler era_handler = new CCEastAsianLunisolarEraHandler();
// Token: 0x040004B8 RID: 1208
private static DateTime ChineseMin = new DateTime(1901, 2, 19);
// Token: 0x040004B9 RID: 1209
private static DateTime ChineseMax = new DateTime(2101, 1, 28, 23, 59, 59, 999);
}
}
@@ -0,0 +1,38 @@
using System;
namespace System.Globalization
{
// Token: 0x0200017B RID: 379
[Serializable]
internal sealed class CodePageDataItem
{
// Token: 0x06001240 RID: 4672 RVA: 0x00047F40 File Offset: 0x00046140
private CodePageDataItem()
{
}
// Token: 0x040004BA RID: 1210
private string m_bodyName;
// Token: 0x040004BB RID: 1211
private int m_codePage;
// Token: 0x040004BC RID: 1212
private int m_dataIndex;
// Token: 0x040004BD RID: 1213
private string m_description;
// Token: 0x040004BE RID: 1214
private uint m_flags;
// Token: 0x040004BF RID: 1215
private string m_headerName;
// Token: 0x040004C0 RID: 1216
private int m_uiFamilyCodePage;
// Token: 0x040004C1 RID: 1217
private string m_webName;
}
}
+1131
View File
@@ -0,0 +1,1131 @@
using System;
using System.Collections;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using Mono.Globalization.Unicode;
namespace System.Globalization
{
/// <summary>Implements a set of methods for culture-sensitive string comparisons.</summary>
// Token: 0x0200017C RID: 380
[ComVisible(true)]
[Serializable]
public class CompareInfo : IDeserializationCallback
{
// Token: 0x06001241 RID: 4673 RVA: 0x00047F48 File Offset: 0x00046148
private CompareInfo()
{
}
// Token: 0x06001242 RID: 4674 RVA: 0x00047F50 File Offset: 0x00046150
internal CompareInfo(CultureInfo ci)
{
this.culture = ci.LCID;
if (CompareInfo.UseManagedCollation)
{
object obj = CompareInfo.monitor;
lock (obj)
{
if (CompareInfo.collators == null)
{
CompareInfo.collators = new Hashtable();
}
this.collator = (SimpleCollator)CompareInfo.collators[ci.LCID];
if (this.collator == null)
{
this.collator = new SimpleCollator(ci);
CompareInfo.collators[ci.LCID] = this.collator;
}
}
}
else
{
this.icu_name = ci.IcuName;
this.construct_compareinfo(this.icu_name);
}
}
/// <summary>Runs when the entire object graph has been deserialized.</summary>
/// <param name="sender">The object that initiated the callback. </param>
// Token: 0x06001244 RID: 4676 RVA: 0x00048070 File Offset: 0x00046270
void IDeserializationCallback.OnDeserialization(object sender)
{
if (CompareInfo.UseManagedCollation)
{
this.collator = new SimpleCollator(new CultureInfo(this.culture));
}
else
{
try
{
this.construct_compareinfo(this.icu_name);
}
catch
{
}
}
}
// Token: 0x1700030C RID: 780
// (get) Token: 0x06001245 RID: 4677 RVA: 0x000480D8 File Offset: 0x000462D8
internal static bool UseManagedCollation
{
get
{
return CompareInfo.useManagedCollation;
}
}
// Token: 0x06001246 RID: 4678
[MethodImpl(MethodImplOptions.InternalCall)]
private extern void construct_compareinfo(string locale);
// Token: 0x06001247 RID: 4679
[MethodImpl(MethodImplOptions.InternalCall)]
private extern void free_internal_collator();
// Token: 0x06001248 RID: 4680
[MethodImpl(MethodImplOptions.InternalCall)]
private extern int internal_compare(string str1, int offset1, int length1, string str2, int offset2, int length2, CompareOptions options);
// Token: 0x06001249 RID: 4681
[MethodImpl(MethodImplOptions.InternalCall)]
private extern void assign_sortkey(object key, string source, CompareOptions options);
// Token: 0x0600124A RID: 4682
[MethodImpl(MethodImplOptions.InternalCall)]
private extern int internal_index(string source, int sindex, int count, char value, CompareOptions options, bool first);
// Token: 0x0600124B RID: 4683
[MethodImpl(MethodImplOptions.InternalCall)]
private extern int internal_index(string source, int sindex, int count, string value, CompareOptions options, bool first);
/// <summary>Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.</summary>
// Token: 0x0600124C RID: 4684 RVA: 0x000480E0 File Offset: 0x000462E0
~CompareInfo()
{
this.free_internal_collator();
}
// Token: 0x0600124D RID: 4685 RVA: 0x0004811C File Offset: 0x0004631C
private int internal_compare_managed(string str1, int offset1, int length1, string str2, int offset2, int length2, CompareOptions options)
{
return this.collator.Compare(str1, offset1, length1, str2, offset2, length2, options);
}
// Token: 0x0600124E RID: 4686 RVA: 0x00048140 File Offset: 0x00046340
private int internal_compare_switch(string str1, int offset1, int length1, string str2, int offset2, int length2, CompareOptions options)
{
return (!CompareInfo.UseManagedCollation) ? this.internal_compare(str1, offset1, length1, str2, offset2, length2, options) : this.internal_compare_managed(str1, offset1, length1, str2, offset2, length2, options);
}
/// <summary>Compares two strings. </summary>
/// <returns>Value Condition zero The two strings are equal. less than zero <paramref name="string1" /> is less than <paramref name="string2" />. greater than zero <paramref name="string1" /> is greater than <paramref name="string2" />. </returns>
/// <param name="string1">The first string to compare. </param>
/// <param name="string2">The second string to compare. </param>
// Token: 0x0600124F RID: 4687 RVA: 0x00048180 File Offset: 0x00046380
public virtual int Compare(string string1, string string2)
{
return this.Compare(string1, string2, CompareOptions.None);
}
/// <summary>Compares two strings using the specified <see cref="T:System.Globalization.CompareOptions" /> value.</summary>
/// <returns>Value Condition zero The two strings are equal. less than zero <paramref name="string1" /> is less than <paramref name="string2" />. greater than zero <paramref name="string1" /> is greater than <paramref name="string2" />. </returns>
/// <param name="string1">The first string to compare. </param>
/// <param name="string2">The second string to compare. </param>
/// <param name="options">The <see cref="T:System.Globalization.CompareOptions" /> value that defines how <paramref name="string1" /> and <paramref name="string2" /> should be compared. <paramref name="options" /> is either the value <see cref="F:System.Globalization.CompareOptions.Ordinal" /> used by itself, or the bitwise combination of one or more of the following values: <see cref="F:System.Globalization.CompareOptions.IgnoreCase" />, <see cref="F:System.Globalization.CompareOptions.IgnoreSymbols" />, <see cref="F:System.Globalization.CompareOptions.IgnoreNonSpace" />, <see cref="F:System.Globalization.CompareOptions.IgnoreWidth" />, <see cref="F:System.Globalization.CompareOptions.IgnoreKanaType" />, and <see cref="F:System.Globalization.CompareOptions.StringSort" />.</param>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="options" /> contains an invalid <see cref="T:System.Globalization.CompareOptions" /> value. </exception>
// Token: 0x06001250 RID: 4688 RVA: 0x0004818C File Offset: 0x0004638C
public virtual int Compare(string string1, string string2, CompareOptions options)
{
if ((options & (CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace | CompareOptions.IgnoreSymbols | CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.StringSort | CompareOptions.Ordinal | CompareOptions.OrdinalIgnoreCase)) != options)
{
throw new ArgumentException("options");
}
if (string1 == null)
{
if (string2 == null)
{
return 0;
}
return -1;
}
else
{
if (string2 == null)
{
return 1;
}
if (string1.Length == 0 && string2.Length == 0)
{
return 0;
}
return this.internal_compare_switch(string1, 0, string1.Length, string2, 0, string2.Length, options);
}
}
/// <summary>Compares the end section of a string with the end section of another string.</summary>
/// <returns>Value Condition zero The two strings are equal. less than zero The specified section of <paramref name="string1" /> is less than the specified section of <paramref name="string2" />. greater than zero The specified section of <paramref name="string1" /> is greater than the specified section of <paramref name="string2" />. </returns>
/// <param name="string1">The first string to compare. </param>
/// <param name="offset1">The zero-based index of the character in <paramref name="string1" /> at which to start comparing. </param>
/// <param name="string2">The second string to compare. </param>
/// <param name="offset2">The zero-based index of the character in <paramref name="string2" /> at which to start comparing. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="offset1" /> or <paramref name="offset2" /> is less than zero.-or- <paramref name="offset1" /> is greater than or equal to the number of characters in <paramref name="string1" />.-or- <paramref name="offset2" /> is greater than or equal to the number of characters in <paramref name="string2" />. </exception>
// Token: 0x06001251 RID: 4689 RVA: 0x000481F8 File Offset: 0x000463F8
public virtual int Compare(string string1, int offset1, string string2, int offset2)
{
return this.Compare(string1, offset1, string2, offset2, CompareOptions.None);
}
/// <summary>Compares the end section of a string with the end section of another string using the specified <see cref="T:System.Globalization.CompareOptions" /> value.</summary>
/// <returns>Value Condition zero The two strings are equal. less than zero The specified section of <paramref name="string1" /> is less than the specified section of <paramref name="string2" />. greater than zero The specified section of <paramref name="string1" /> is greater than the specified section of <paramref name="string2" />. </returns>
/// <param name="string1">The first string to compare. </param>
/// <param name="offset1">The zero-based index of the character in <paramref name="string1" /> at which to start comparing. </param>
/// <param name="string2">The second string to compare. </param>
/// <param name="offset2">The zero-based index of the character in <paramref name="string2" /> at which to start comparing. </param>
/// <param name="options">The <see cref="T:System.Globalization.CompareOptions" /> value that defines how <paramref name="string1" /> and <paramref name="string2" /> should be compared. <paramref name="options" /> is either the value <see cref="F:System.Globalization.CompareOptions.Ordinal" /> used by itself, or the bitwise combination of one or more of the following values: <see cref="F:System.Globalization.CompareOptions.IgnoreCase" />, <see cref="F:System.Globalization.CompareOptions.IgnoreSymbols" />, <see cref="F:System.Globalization.CompareOptions.IgnoreNonSpace" />, <see cref="F:System.Globalization.CompareOptions.IgnoreWidth" />, <see cref="F:System.Globalization.CompareOptions.IgnoreKanaType" />, and <see cref="F:System.Globalization.CompareOptions.StringSort" />.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="offset1" /> or <paramref name="offset2" /> is less than zero.-or- <paramref name="offset1" /> is greater than or equal to the number of characters in <paramref name="string1" />.-or- <paramref name="offset2" /> is greater than or equal to the number of characters in <paramref name="string2" />. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="options" /> contains an invalid <see cref="T:System.Globalization.CompareOptions" /> value. </exception>
// Token: 0x06001252 RID: 4690 RVA: 0x00048208 File Offset: 0x00046408
public virtual int Compare(string string1, int offset1, string string2, int offset2, CompareOptions options)
{
if ((options & (CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace | CompareOptions.IgnoreSymbols | CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.StringSort | CompareOptions.Ordinal | CompareOptions.OrdinalIgnoreCase)) != options)
{
throw new ArgumentException("options");
}
if (string1 == null)
{
if (string2 == null)
{
return 0;
}
return -1;
}
else
{
if (string2 == null)
{
return 1;
}
if ((string1.Length == 0 || offset1 == string1.Length) && (string2.Length == 0 || offset2 == string2.Length))
{
return 0;
}
if (offset1 < 0 || offset2 < 0)
{
throw new ArgumentOutOfRangeException("Offsets must not be less than zero");
}
if (offset1 > string1.Length)
{
throw new ArgumentOutOfRangeException("Offset1 is greater than or equal to the length of string1");
}
if (offset2 > string2.Length)
{
throw new ArgumentOutOfRangeException("Offset2 is greater than or equal to the length of string2");
}
return this.internal_compare_switch(string1, offset1, string1.Length - offset1, string2, offset2, string2.Length - offset2, options);
}
}
/// <summary>Compares a section of one string with a section of another string.</summary>
/// <returns>Value Condition zero The two strings are equal. less than zero The specified section of <paramref name="string1" /> is less than the specified section of <paramref name="string2" />. greater than zero The specified section of <paramref name="string1" /> is greater than the specified section of <paramref name="string2" />. </returns>
/// <param name="string1">The first string to compare. </param>
/// <param name="offset1">The zero-based index of the character in <paramref name="string1" /> at which to start comparing. </param>
/// <param name="length1">The number of consecutive characters in <paramref name="string1" /> to compare. </param>
/// <param name="string2">The second string to compare. </param>
/// <param name="offset2">The zero-based index of the character in <paramref name="string2" /> at which to start comparing. </param>
/// <param name="length2">The number of consecutive characters in <paramref name="string2" /> to compare. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="offset1" /> or <paramref name="length1" /> or <paramref name="offset2" /> or <paramref name="length2" /> is less than zero.-or- <paramref name="offset1" /> is greater than or equal to the number of characters in <paramref name="string1" />.-or- <paramref name="offset2" /> is greater than or equal to the number of characters in <paramref name="string2" />.-or- <paramref name="length1" /> is greater than the number of characters from <paramref name="offset1" /> to the end of <paramref name="string1" />.-or- <paramref name="length2" /> is greater than the number of characters from <paramref name="offset2" /> to the end of <paramref name="string2" />. </exception>
// Token: 0x06001253 RID: 4691 RVA: 0x000482E0 File Offset: 0x000464E0
public virtual int Compare(string string1, int offset1, int length1, string string2, int offset2, int length2)
{
return this.Compare(string1, offset1, length1, string2, offset2, length2, CompareOptions.None);
}
/// <summary>Compares a section of one string with a section of another string using the specified <see cref="T:System.Globalization.CompareOptions" /> value.</summary>
/// <returns>Value Condition zero The two strings are equal. less than zero The specified section of <paramref name="string1" /> is less than the specified section of <paramref name="string2" />. greater than zero The specified section of <paramref name="string1" /> is greater than the specified section of <paramref name="string2" />. </returns>
/// <param name="string1">The first string to compare. </param>
/// <param name="offset1">The zero-based index of the character in <paramref name="string1" /> at which to start comparing. </param>
/// <param name="length1">The number of consecutive characters in <paramref name="string1" /> to compare. </param>
/// <param name="string2">The second string to compare. </param>
/// <param name="offset2">The zero-based index of the character in <paramref name="string2" /> at which to start comparing. </param>
/// <param name="length2">The number of consecutive characters in <paramref name="string2" /> to compare. </param>
/// <param name="options">The <see cref="T:System.Globalization.CompareOptions" /> value that defines how <paramref name="string1" /> and <paramref name="string2" /> should be compared. <paramref name="options" /> is either the value <see cref="F:System.Globalization.CompareOptions.Ordinal" /> used by itself, or the bitwise combination of one or more of the following values: <see cref="F:System.Globalization.CompareOptions.IgnoreCase" />, <see cref="F:System.Globalization.CompareOptions.IgnoreSymbols" />, <see cref="F:System.Globalization.CompareOptions.IgnoreNonSpace" />, <see cref="F:System.Globalization.CompareOptions.IgnoreWidth" />, <see cref="F:System.Globalization.CompareOptions.IgnoreKanaType" />, and <see cref="F:System.Globalization.CompareOptions.StringSort" />.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="offset1" /> or <paramref name="length1" /> or <paramref name="offset2" /> or <paramref name="length2" /> is less than zero.-or- <paramref name="offset1" /> is greater than or equal to the number of characters in <paramref name="string1" />.-or- <paramref name="offset2" /> is greater than or equal to the number of characters in <paramref name="string2" />.-or- <paramref name="length1" /> is greater than the number of characters from <paramref name="offset1" /> to the end of <paramref name="string1" />.-or- <paramref name="length2" /> is greater than the number of characters from <paramref name="offset2" /> to the end of <paramref name="string2" />. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="options" /> contains an invalid <see cref="T:System.Globalization.CompareOptions" /> value. </exception>
// Token: 0x06001254 RID: 4692 RVA: 0x00048300 File Offset: 0x00046500
public virtual int Compare(string string1, int offset1, int length1, string string2, int offset2, int length2, CompareOptions options)
{
if ((options & (CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace | CompareOptions.IgnoreSymbols | CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.StringSort | CompareOptions.Ordinal | CompareOptions.OrdinalIgnoreCase)) != options)
{
throw new ArgumentException("options");
}
if (string1 == null)
{
if (string2 == null)
{
return 0;
}
return -1;
}
else
{
if (string2 == null)
{
return 1;
}
if ((string1.Length == 0 || offset1 == string1.Length || length1 == 0) && (string2.Length == 0 || offset2 == string2.Length || length2 == 0))
{
return 0;
}
if (offset1 < 0 || length1 < 0 || offset2 < 0 || length2 < 0)
{
throw new ArgumentOutOfRangeException("Offsets and lengths must not be less than zero");
}
if (offset1 > string1.Length)
{
throw new ArgumentOutOfRangeException("Offset1 is greater than or equal to the length of string1");
}
if (offset2 > string2.Length)
{
throw new ArgumentOutOfRangeException("Offset2 is greater than or equal to the length of string2");
}
if (length1 > string1.Length - offset1)
{
throw new ArgumentOutOfRangeException("Length1 is greater than the number of characters from offset1 to the end of string1");
}
if (length2 > string2.Length - offset2)
{
throw new ArgumentOutOfRangeException("Length2 is greater than the number of characters from offset2 to the end of string2");
}
return this.internal_compare_switch(string1, offset1, length1, string2, offset2, length2, options);
}
}
/// <summary>Determines whether the specified object is equal to the current <see cref="T:System.Globalization.CompareInfo" /> object.</summary>
/// <returns>true if the specified object is equal to the current <see cref="T:System.Globalization.CompareInfo" />; otherwise, false.</returns>
/// <param name="value">The object to compare with the current <see cref="T:System.Globalization.CompareInfo" />. </param>
// Token: 0x06001255 RID: 4693 RVA: 0x00048420 File Offset: 0x00046620
public override bool Equals(object value)
{
CompareInfo compareInfo = value as CompareInfo;
return compareInfo != null && compareInfo.culture == this.culture;
}
/// <summary>Initializes a new <see cref="T:System.Globalization.CompareInfo" /> object that is associated with the culture with the specified identifier.</summary>
/// <returns>A new <see cref="T:System.Globalization.CompareInfo" /> object associated with the culture with the specified identifier and using string comparison methods in the current <see cref="T:System.Reflection.Assembly" />.</returns>
/// <param name="culture">An integer representing the culture identifier. </param>
// Token: 0x06001256 RID: 4694 RVA: 0x0004844C File Offset: 0x0004664C
public static CompareInfo GetCompareInfo(int culture)
{
return new CultureInfo(culture).CompareInfo;
}
/// <summary>Initializes a new <see cref="T:System.Globalization.CompareInfo" /> object that is associated with the culture with the specified name.</summary>
/// <returns>A new <see cref="T:System.Globalization.CompareInfo" /> object associated with the culture with the specified identifier and using string comparison methods in the current <see cref="T:System.Reflection.Assembly" />.</returns>
/// <param name="name">A string representing the culture name. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="name" /> is an invalid culture name. </exception>
// Token: 0x06001257 RID: 4695 RVA: 0x0004845C File Offset: 0x0004665C
public static CompareInfo GetCompareInfo(string name)
{
if (name == null)
{
throw new ArgumentNullException("name");
}
return new CultureInfo(name).CompareInfo;
}
/// <summary>Initializes a new <see cref="T:System.Globalization.CompareInfo" /> object that is associated with the specified culture and that uses string comparison methods in the specified <see cref="T:System.Reflection.Assembly" />.</summary>
/// <returns>A new <see cref="T:System.Globalization.CompareInfo" /> object associated with the culture with the specified identifier and using string comparison methods in the current <see cref="T:System.Reflection.Assembly" />.</returns>
/// <param name="culture">An integer representing the culture identifier. </param>
/// <param name="assembly">An <see cref="T:System.Reflection.Assembly" /> that contains the string comparison methods to use. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="assembly" /> is null. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="assembly" /> is of an invalid type. </exception>
// Token: 0x06001258 RID: 4696 RVA: 0x0004847C File Offset: 0x0004667C
public static CompareInfo GetCompareInfo(int culture, Assembly assembly)
{
if (assembly == null)
{
throw new ArgumentNullException("assembly");
}
if (assembly != typeof(object).Module.Assembly)
{
throw new ArgumentException("Assembly is an invalid type");
}
return CompareInfo.GetCompareInfo(culture);
}
/// <summary>Initializes a new <see cref="T:System.Globalization.CompareInfo" /> object that is associated with the specified culture and that uses string comparison methods in the specified <see cref="T:System.Reflection.Assembly" />.</summary>
/// <returns>A new <see cref="T:System.Globalization.CompareInfo" /> object associated with the culture with the specified identifier and using string comparison methods in the current <see cref="T:System.Reflection.Assembly" />.</returns>
/// <param name="name">A string representing the culture name. </param>
/// <param name="assembly">An <see cref="T:System.Reflection.Assembly" /> that contains the string comparison methods to use. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null.-or- <paramref name="assembly" /> is null. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="name" /> is an invalid culture name.-or- <paramref name="assembly" /> is of an invalid type. </exception>
// Token: 0x06001259 RID: 4697 RVA: 0x000484C8 File Offset: 0x000466C8
public static CompareInfo GetCompareInfo(string name, Assembly assembly)
{
if (name == null)
{
throw new ArgumentNullException("name");
}
if (assembly == null)
{
throw new ArgumentNullException("assembly");
}
if (assembly != typeof(object).Module.Assembly)
{
throw new ArgumentException("Assembly is an invalid type");
}
return CompareInfo.GetCompareInfo(name);
}
/// <summary>Serves as a hash function for the current <see cref="T:System.Globalization.CompareInfo" /> for hashing algorithms and data structures, such as a hash table.</summary>
/// <returns>A hash code for the current <see cref="T:System.Globalization.CompareInfo" />.</returns>
// Token: 0x0600125A RID: 4698 RVA: 0x00048524 File Offset: 0x00046724
public override int GetHashCode()
{
return this.LCID;
}
/// <summary>Gets the sort key for the specified string.</summary>
/// <returns>The <see cref="T:System.Globalization.SortKey" /> object that contains the sort key for the specified string.</returns>
/// <param name="source">The string for which a <see cref="T:System.Globalization.SortKey" /> object is obtained. </param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x0600125B RID: 4699 RVA: 0x0004852C File Offset: 0x0004672C
public virtual SortKey GetSortKey(string source)
{
return this.GetSortKey(source, CompareOptions.None);
}
/// <summary>Gets a <see cref="T:System.Globalization.SortKey" /> object for the specified string using the specified <see cref="T:System.Globalization.CompareOptions" /> value.</summary>
/// <returns>The <see cref="T:System.Globalization.SortKey" /> object that contains the sort key for the specified string.</returns>
/// <param name="source">The string for which a <see cref="T:System.Globalization.SortKey" /> object is obtained. </param>
/// <param name="options">The <see cref="T:System.Globalization.CompareOptions" /> value that define how the sort key is calculated. <paramref name="options" /> is a bitwise combination of one or more of the following values: <see cref="F:System.Globalization.CompareOptions.IgnoreCase" />, <see cref="F:System.Globalization.CompareOptions.IgnoreSymbols" />, <see cref="F:System.Globalization.CompareOptions.IgnoreNonSpace" />, <see cref="F:System.Globalization.CompareOptions.IgnoreWidth" />, <see cref="F:System.Globalization.CompareOptions.IgnoreKanaType" />, and <see cref="F:System.Globalization.CompareOptions.StringSort" />.</param>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="options" /> contains an invalid <see cref="T:System.Globalization.CompareOptions" /> value. </exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x0600125C RID: 4700 RVA: 0x00048538 File Offset: 0x00046738
public virtual SortKey GetSortKey(string source, CompareOptions options)
{
if (options == CompareOptions.OrdinalIgnoreCase || options == CompareOptions.Ordinal)
{
throw new ArgumentException("Now allowed CompareOptions.", "options");
}
if (CompareInfo.UseManagedCollation)
{
return this.collator.GetSortKey(source, options);
}
SortKey sortKey = new SortKey(this.culture, source, options);
this.assign_sortkey(sortKey, source, options);
return sortKey;
}
/// <summary>Searches for the specified character and returns the zero-based index of the first occurrence within the entire source string.</summary>
/// <returns>The zero-based index of the first occurrence of <paramref name="value" /> within the entire <paramref name="source" />, if found; otherwise, -1.</returns>
/// <param name="source">The string to search. </param>
/// <param name="value">The character to locate within <paramref name="source" />. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null. </exception>
// Token: 0x0600125D RID: 4701 RVA: 0x000485A4 File Offset: 0x000467A4
public virtual int IndexOf(string source, char value)
{
return this.IndexOf(source, value, 0, source.Length, CompareOptions.None);
}
/// <summary>Searches for the specified substring and returns the zero-based index of the first occurrence within the entire source string.</summary>
/// <returns>The zero-based index of the first occurrence of <paramref name="value" /> within the entire <paramref name="source" />, if found; otherwise, -1.</returns>
/// <param name="source">The string to search. </param>
/// <param name="value">The string to locate within <paramref name="source" />. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null.-or- <paramref name="value" /> is null. </exception>
// Token: 0x0600125E RID: 4702 RVA: 0x000485C4 File Offset: 0x000467C4
public virtual int IndexOf(string source, string value)
{
return this.IndexOf(source, value, 0, source.Length, CompareOptions.None);
}
/// <summary>Searches for the specified character and returns the zero-based index of the first occurrence within the entire source string using the specified <see cref="T:System.Globalization.CompareOptions" /> value.</summary>
/// <returns>The zero-based index of the first occurrence of <paramref name="value" /> within the entire <paramref name="source" /> using the specified <see cref="T:System.Globalization.CompareOptions" /> value, if found; otherwise, -1.</returns>
/// <param name="source">The string to search. </param>
/// <param name="value">The character to locate within <paramref name="source" />. </param>
/// <param name="options">The <see cref="T:System.Globalization.CompareOptions" /> value that defines how the strings should be compared. <paramref name="options" /> is either the value <see cref="F:System.Globalization.CompareOptions.Ordinal" /> used by itself, or the bitwise combination of one or more of the following values: <see cref="F:System.Globalization.CompareOptions.IgnoreCase" />, <see cref="F:System.Globalization.CompareOptions.IgnoreSymbols" />, <see cref="F:System.Globalization.CompareOptions.IgnoreNonSpace" />, <see cref="F:System.Globalization.CompareOptions.IgnoreWidth" />, and <see cref="F:System.Globalization.CompareOptions.IgnoreKanaType" />.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="options" /> contains an invalid <see cref="T:System.Globalization.CompareOptions" /> value. </exception>
// Token: 0x0600125F RID: 4703 RVA: 0x000485E4 File Offset: 0x000467E4
public virtual int IndexOf(string source, char value, CompareOptions options)
{
return this.IndexOf(source, value, 0, source.Length, options);
}
/// <summary>Searches for the specified character and returns the zero-based index of the first occurrence within the section of the source string that extends from the specified index to the end of the string.</summary>
/// <returns>The zero-based index of the first occurrence of <paramref name="value" /> within the section of <paramref name="source" /> that extends from <paramref name="startIndex" /> to the end of <paramref name="source" />, if found; otherwise, -1.</returns>
/// <param name="source">The string to search. </param>
/// <param name="value">The character to locate within <paramref name="source" />. </param>
/// <param name="startIndex">The zero-based starting index of the search. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="startIndex" /> is outside the range of valid indexes for <paramref name="source" />. </exception>
// Token: 0x06001260 RID: 4704 RVA: 0x00048604 File Offset: 0x00046804
public virtual int IndexOf(string source, char value, int startIndex)
{
return this.IndexOf(source, value, startIndex, source.Length - startIndex, CompareOptions.None);
}
/// <summary>Searches for the specified substring and returns the zero-based index of the first occurrence within the entire source string using the specified <see cref="T:System.Globalization.CompareOptions" /> value.</summary>
/// <returns>The zero-based index of the first occurrence of <paramref name="value" /> within the entire <paramref name="source" /> using the specified <see cref="T:System.Globalization.CompareOptions" /> value, if found; otherwise, -1.</returns>
/// <param name="source">The string to search. </param>
/// <param name="value">The string to locate within <paramref name="source" />. </param>
/// <param name="options">The <see cref="T:System.Globalization.CompareOptions" /> value that defines how <paramref name="source" /> and <paramref name="value" /> should be compared. <paramref name="options" /> is either the value <see cref="F:System.Globalization.CompareOptions.Ordinal" /> used by itself, or the bitwise combination of one or more of the following values: <see cref="F:System.Globalization.CompareOptions.IgnoreCase" />, <see cref="F:System.Globalization.CompareOptions.IgnoreSymbols" />, <see cref="F:System.Globalization.CompareOptions.IgnoreNonSpace" />, <see cref="F:System.Globalization.CompareOptions.IgnoreWidth" />, and <see cref="F:System.Globalization.CompareOptions.IgnoreKanaType" />.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null.-or- <paramref name="value" /> is null. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="options" /> contains an invalid <see cref="T:System.Globalization.CompareOptions" /> value. </exception>
// Token: 0x06001261 RID: 4705 RVA: 0x00048624 File Offset: 0x00046824
public virtual int IndexOf(string source, string value, CompareOptions options)
{
return this.IndexOf(source, value, 0, source.Length, options);
}
/// <summary>Searches for the specified substring and returns the zero-based index of the first occurrence within the section of the source string that extends from the specified index to the end of the string.</summary>
/// <returns>The zero-based index of the first occurrence of <paramref name="value" /> within the section of <paramref name="source" /> that extends from <paramref name="startIndex" /> to the end of <paramref name="source" />, if found; otherwise, -1.</returns>
/// <param name="source">The string to search. </param>
/// <param name="value">The string to locate within <paramref name="source" />. </param>
/// <param name="startIndex">The zero-based starting index of the search. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null.-or- <paramref name="value" /> is null. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="startIndex" /> is outside the range of valid indexes for <paramref name="source" />. </exception>
// Token: 0x06001262 RID: 4706 RVA: 0x00048644 File Offset: 0x00046844
public virtual int IndexOf(string source, string value, int startIndex)
{
return this.IndexOf(source, value, startIndex, source.Length - startIndex, CompareOptions.None);
}
/// <summary>Searches for the specified character and returns the zero-based index of the first occurrence within the section of the source string that extends from the specified index to the end of the string using the specified <see cref="T:System.Globalization.CompareOptions" /> value.</summary>
/// <returns>The zero-based index of the first occurrence of <paramref name="value" /> within the section of <paramref name="source" /> that extends from <paramref name="startIndex" /> to the end of <paramref name="source" /> using the specified <see cref="T:System.Globalization.CompareOptions" /> value, if found; otherwise, -1.</returns>
/// <param name="source">The string to search. </param>
/// <param name="value">The character to locate within <paramref name="source" />. </param>
/// <param name="startIndex">The zero-based starting index of the search. </param>
/// <param name="options">The <see cref="T:System.Globalization.CompareOptions" /> value that defines how <paramref name="source" /> and <paramref name="value" /> should be compared. <paramref name="options" /> is either the value <see cref="F:System.Globalization.CompareOptions.Ordinal" /> used by itself, or the bitwise combination of one or more of the following values: <see cref="F:System.Globalization.CompareOptions.IgnoreCase" />, <see cref="F:System.Globalization.CompareOptions.IgnoreSymbols" />, <see cref="F:System.Globalization.CompareOptions.IgnoreNonSpace" />, <see cref="F:System.Globalization.CompareOptions.IgnoreWidth" />, and <see cref="F:System.Globalization.CompareOptions.IgnoreKanaType" />.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="startIndex" /> is outside the range of valid indexes for <paramref name="source" />. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="options" /> contains an invalid <see cref="T:System.Globalization.CompareOptions" /> value. </exception>
// Token: 0x06001263 RID: 4707 RVA: 0x00048664 File Offset: 0x00046864
public virtual int IndexOf(string source, char value, int startIndex, CompareOptions options)
{
return this.IndexOf(source, value, startIndex, source.Length - startIndex, options);
}
/// <summary>Searches for the specified character and returns the zero-based index of the first occurrence within the section of the source string that starts at the specified index and contains the specified number of elements.</summary>
/// <returns>The zero-based index of the first occurrence of <paramref name="value" /> within the section of <paramref name="source" /> that starts at <paramref name="startIndex" /> and contains the number of elements specified by <paramref name="count" />, if found; otherwise, -1.</returns>
/// <param name="source">The string to search. </param>
/// <param name="value">The character to locate within <paramref name="source" />. </param>
/// <param name="startIndex">The zero-based starting index of the search. </param>
/// <param name="count">The number of elements in the section to search. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="startIndex" /> is outside the range of valid indexes for <paramref name="source" />.-or- <paramref name="count" /> is less than zero.-or- <paramref name="startIndex" /> and <paramref name="count" /> do not specify a valid section in <paramref name="source" />. </exception>
// Token: 0x06001264 RID: 4708 RVA: 0x00048684 File Offset: 0x00046884
public virtual int IndexOf(string source, char value, int startIndex, int count)
{
return this.IndexOf(source, value, startIndex, count, CompareOptions.None);
}
/// <summary>Searches for the specified substring and returns the zero-based index of the first occurrence within the section of the source string that extends from the specified index to the end of the string using the specified <see cref="T:System.Globalization.CompareOptions" /> value.</summary>
/// <returns>The zero-based index of the first occurrence of <paramref name="value" /> within the section of <paramref name="source" /> that extends from <paramref name="startIndex" /> to the end of <paramref name="source" /> using the specified <see cref="T:System.Globalization.CompareOptions" /> value, if found; otherwise, -1.</returns>
/// <param name="source">The string to search. </param>
/// <param name="value">The string to locate within <paramref name="source" />. </param>
/// <param name="startIndex">The zero-based starting index of the search. </param>
/// <param name="options">The <see cref="T:System.Globalization.CompareOptions" /> value that defines how <paramref name="source" /> and <paramref name="value" /> should be compared. <paramref name="options" /> is either the value <see cref="F:System.Globalization.CompareOptions.Ordinal" /> used by itself, or the bitwise combination of one or more of the following values: <see cref="F:System.Globalization.CompareOptions.IgnoreCase" />, <see cref="F:System.Globalization.CompareOptions.IgnoreSymbols" />, <see cref="F:System.Globalization.CompareOptions.IgnoreNonSpace" />, <see cref="F:System.Globalization.CompareOptions.IgnoreWidth" />, and <see cref="F:System.Globalization.CompareOptions.IgnoreKanaType" />.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null.-or- <paramref name="value" /> is null. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="startIndex" /> is outside the range of valid indexes for <paramref name="source" />. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="options" /> contains an invalid <see cref="T:System.Globalization.CompareOptions" /> value. </exception>
// Token: 0x06001265 RID: 4709 RVA: 0x00048694 File Offset: 0x00046894
public virtual int IndexOf(string source, string value, int startIndex, CompareOptions options)
{
return this.IndexOf(source, value, startIndex, source.Length - startIndex, options);
}
/// <summary>Searches for the specified substring and returns the zero-based index of the first occurrence within the section of the source string that starts at the specified index and contains the specified number of elements.</summary>
/// <returns>The zero-based index of the first occurrence of <paramref name="value" /> within the section of <paramref name="source" /> that starts at <paramref name="startIndex" /> and contains the number of elements specified by <paramref name="count" />, if found; otherwise, -1.</returns>
/// <param name="source">The string to search. </param>
/// <param name="value">The string to locate within <paramref name="source" />. </param>
/// <param name="startIndex">The zero-based starting index of the search. </param>
/// <param name="count">The number of elements in the section to search. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null.-or- <paramref name="value" /> is null. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="startIndex" /> is outside the range of valid indexes for <paramref name="source" />.-or- <paramref name="count" /> is less than zero.-or- <paramref name="startIndex" /> and <paramref name="count" /> do not specify a valid section in <paramref name="source" />. </exception>
// Token: 0x06001266 RID: 4710 RVA: 0x000486B4 File Offset: 0x000468B4
public virtual int IndexOf(string source, string value, int startIndex, int count)
{
return this.IndexOf(source, value, startIndex, count, CompareOptions.None);
}
// Token: 0x06001267 RID: 4711 RVA: 0x000486C4 File Offset: 0x000468C4
private int internal_index_managed(string s, int sindex, int count, char c, CompareOptions opt, bool first)
{
return (!first) ? this.collator.LastIndexOf(s, c, sindex, count, opt) : this.collator.IndexOf(s, c, sindex, count, opt);
}
// Token: 0x06001268 RID: 4712 RVA: 0x00048704 File Offset: 0x00046904
private int internal_index_switch(string s, int sindex, int count, char c, CompareOptions opt, bool first)
{
return (!CompareInfo.UseManagedCollation || (first && opt == CompareOptions.Ordinal)) ? this.internal_index(s, sindex, count, c, opt, first) : this.internal_index_managed(s, sindex, count, c, opt, first);
}
/// <summary>Searches for the specified character and returns the zero-based index of the first occurrence within the section of the source string that starts at the specified index and contains the specified number of elements using the specified <see cref="T:System.Globalization.CompareOptions" /> value.</summary>
/// <returns>The zero-based index of the first occurrence of <paramref name="value" /> within the section of <paramref name="source" /> that starts at <paramref name="startIndex" /> and contains the number of elements specified by <paramref name="count" />, using the specified <see cref="T:System.Globalization.CompareOptions" /> value, if found; otherwise, -1.</returns>
/// <param name="source">The string to search. </param>
/// <param name="value">The character to locate within <paramref name="source" />. </param>
/// <param name="startIndex">The zero-based starting index of the search. </param>
/// <param name="count">The number of elements in the section to search. </param>
/// <param name="options">The <see cref="T:System.Globalization.CompareOptions" /> value that defines how <paramref name="source" /> and <paramref name="value" /> should be compared. <paramref name="options" /> is either the value <see cref="F:System.Globalization.CompareOptions.Ordinal" /> used by itself, or the bitwise combination of one or more of the following values: <see cref="F:System.Globalization.CompareOptions.IgnoreCase" />, <see cref="F:System.Globalization.CompareOptions.IgnoreSymbols" />, <see cref="F:System.Globalization.CompareOptions.IgnoreNonSpace" />, <see cref="F:System.Globalization.CompareOptions.IgnoreWidth" />, and <see cref="F:System.Globalization.CompareOptions.IgnoreKanaType" />.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="startIndex" /> is outside the range of valid indexes for <paramref name="source" />.-or- <paramref name="count" /> is less than zero.-or- <paramref name="startIndex" /> and <paramref name="count" /> do not specify a valid section in <paramref name="source" />. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="options" /> contains an invalid <see cref="T:System.Globalization.CompareOptions" /> value. </exception>
// Token: 0x06001269 RID: 4713 RVA: 0x00048754 File Offset: 0x00046954
public virtual int IndexOf(string source, char value, int startIndex, int count, CompareOptions options)
{
if (source == null)
{
throw new ArgumentNullException("source");
}
if (startIndex < 0)
{
throw new ArgumentOutOfRangeException("startIndex");
}
if (count < 0 || source.Length - startIndex < count)
{
throw new ArgumentOutOfRangeException("count");
}
if ((options & (CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace | CompareOptions.IgnoreSymbols | CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.Ordinal | CompareOptions.OrdinalIgnoreCase)) != options)
{
throw new ArgumentException("options");
}
if (count == 0)
{
return -1;
}
if ((options & CompareOptions.Ordinal) != CompareOptions.None)
{
for (int i = startIndex; i < startIndex + count; i++)
{
if (source[i] == value)
{
return i;
}
}
return -1;
}
return this.internal_index_switch(source, startIndex, count, value, options, true);
}
// Token: 0x0600126A RID: 4714 RVA: 0x0004880C File Offset: 0x00046A0C
private int internal_index_managed(string s1, int sindex, int count, string s2, CompareOptions opt, bool first)
{
return (!first) ? this.collator.LastIndexOf(s1, s2, sindex, count, opt) : this.collator.IndexOf(s1, s2, sindex, count, opt);
}
// Token: 0x0600126B RID: 4715 RVA: 0x0004884C File Offset: 0x00046A4C
private int internal_index_switch(string s1, int sindex, int count, string s2, CompareOptions opt, bool first)
{
return (!CompareInfo.UseManagedCollation || (first && opt == CompareOptions.Ordinal)) ? this.internal_index(s1, sindex, count, s2, opt, first) : this.internal_index_managed(s1, sindex, count, s2, opt, first);
}
/// <summary>Searches for the specified substring and returns the zero-based index of the first occurrence within the section of the source string that starts at the specified index and contains the specified number of elements using the specified <see cref="T:System.Globalization.CompareOptions" /> value.</summary>
/// <returns>The zero-based index of the first occurrence of <paramref name="value" /> within the section of <paramref name="source" /> that starts at <paramref name="startIndex" /> and contains the number of elements specified by <paramref name="count" />, using the specified <see cref="T:System.Globalization.CompareOptions" /> value, if found; otherwise, -1.</returns>
/// <param name="source">The string to search. </param>
/// <param name="value">The string to locate within <paramref name="source" />. </param>
/// <param name="startIndex">The zero-based starting index of the search. </param>
/// <param name="count">The number of elements in the section to search. </param>
/// <param name="options">The <see cref="T:System.Globalization.CompareOptions" /> value that defines how <paramref name="source" /> and <paramref name="value" /> should be compared. <paramref name="options" /> is either the value <see cref="F:System.Globalization.CompareOptions.Ordinal" /> used by itself, or the bitwise combination of one or more of the following values: <see cref="F:System.Globalization.CompareOptions.IgnoreCase" />, <see cref="F:System.Globalization.CompareOptions.IgnoreSymbols" />, <see cref="F:System.Globalization.CompareOptions.IgnoreNonSpace" />, <see cref="F:System.Globalization.CompareOptions.IgnoreWidth" />, and <see cref="F:System.Globalization.CompareOptions.IgnoreKanaType" />.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null.-or- <paramref name="value" /> is null. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="startIndex" /> is outside the range of valid indexes for <paramref name="source" />.-or- <paramref name="count" /> is less than zero.-or- <paramref name="startIndex" /> and <paramref name="count" /> do not specify a valid section in <paramref name="source" />. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="options" /> contains an invalid <see cref="T:System.Globalization.CompareOptions" /> value. </exception>
// Token: 0x0600126C RID: 4716 RVA: 0x0004889C File Offset: 0x00046A9C
public virtual int IndexOf(string source, string value, int startIndex, int count, CompareOptions options)
{
if (source == null)
{
throw new ArgumentNullException("source");
}
if (value == null)
{
throw new ArgumentNullException("value");
}
if (startIndex < 0)
{
throw new ArgumentOutOfRangeException("startIndex");
}
if (count < 0 || source.Length - startIndex < count)
{
throw new ArgumentOutOfRangeException("count");
}
if ((options & (CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace | CompareOptions.IgnoreSymbols | CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.Ordinal | CompareOptions.OrdinalIgnoreCase)) != options)
{
throw new ArgumentException("options");
}
if (value.Length == 0)
{
return startIndex;
}
if (count == 0)
{
return -1;
}
return this.internal_index_switch(source, startIndex, count, value, options, true);
}
/// <summary>Determines whether the specified source string starts with the specified prefix.</summary>
/// <returns>true if the length of <paramref name="prefix" /> is less than or equal to the length of <paramref name="source" /> and <paramref name="source" /> starts with <paramref name="prefix" />; otherwise, false.</returns>
/// <param name="source">The string to search in. </param>
/// <param name="prefix">The string to compare with the beginning of <paramref name="source" />. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null.-or- <paramref name="prefix" /> is null. </exception>
// Token: 0x0600126D RID: 4717 RVA: 0x00048940 File Offset: 0x00046B40
public virtual bool IsPrefix(string source, string prefix)
{
return this.IsPrefix(source, prefix, CompareOptions.None);
}
/// <summary>Determines whether the specified source string starts with the specified prefix using the specified <see cref="T:System.Globalization.CompareOptions" /> value.</summary>
/// <returns>true if the length of <paramref name="prefix" /> is less than or equal to the length of <paramref name="source" /> and <paramref name="source" /> starts with <paramref name="prefix" />; otherwise, false.</returns>
/// <param name="source">The string to search in. </param>
/// <param name="prefix">The string to compare with the beginning of <paramref name="source" />. </param>
/// <param name="options">The <see cref="T:System.Globalization.CompareOptions" /> value that defines how <paramref name="source" /> and <paramref name="prefix" /> should be compared. <paramref name="options" /> is either the value <see cref="F:System.Globalization.CompareOptions.Ordinal" /> used by itself, or the bitwise combination of one or more of the following values: <see cref="F:System.Globalization.CompareOptions.IgnoreCase" />, <see cref="F:System.Globalization.CompareOptions.IgnoreSymbols" />, <see cref="F:System.Globalization.CompareOptions.IgnoreNonSpace" />, <see cref="F:System.Globalization.CompareOptions.IgnoreWidth" />, and <see cref="F:System.Globalization.CompareOptions.IgnoreKanaType" />.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null.-or- <paramref name="prefix" /> is null. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="options" /> contains an invalid <see cref="T:System.Globalization.CompareOptions" /> value. </exception>
// Token: 0x0600126E RID: 4718 RVA: 0x0004894C File Offset: 0x00046B4C
public virtual bool IsPrefix(string source, string prefix, CompareOptions options)
{
if (source == null)
{
throw new ArgumentNullException("source");
}
if (prefix == null)
{
throw new ArgumentNullException("prefix");
}
if (CompareInfo.UseManagedCollation)
{
return this.collator.IsPrefix(source, prefix, options);
}
return source.Length >= prefix.Length && this.Compare(source, 0, prefix.Length, prefix, 0, prefix.Length, options) == 0;
}
/// <summary>Determines whether the specified source string ends with the specified suffix.</summary>
/// <returns>true if the length of <paramref name="suffix" /> is less than or equal to the length of <paramref name="source" /> and <paramref name="source" /> ends with <paramref name="suffix" />; otherwise, false.</returns>
/// <param name="source">The string to search in. </param>
/// <param name="suffix">The string to compare with the end of <paramref name="source" />. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null.-or- <paramref name="suffix" /> is null. </exception>
// Token: 0x0600126F RID: 4719 RVA: 0x000489C4 File Offset: 0x00046BC4
public virtual bool IsSuffix(string source, string suffix)
{
return this.IsSuffix(source, suffix, CompareOptions.None);
}
/// <summary>Determines whether the specified source string ends with the specified suffix using the specified <see cref="T:System.Globalization.CompareOptions" /> value.</summary>
/// <returns>true if the length of <paramref name="suffix" /> is less than or equal to the length of <paramref name="source" /> and <paramref name="source" /> ends with <paramref name="suffix" />; otherwise, false.</returns>
/// <param name="source">The string to search in. </param>
/// <param name="suffix">The string to compare with the end of <paramref name="source" />. </param>
/// <param name="options">The <see cref="T:System.Globalization.CompareOptions" /> value that defines how <paramref name="source" /> and <paramref name="suffix" /> should be compared. <paramref name="options" /> is either the value <see cref="F:System.Globalization.CompareOptions.Ordinal" /> used by itself, or the bitwise combination of one or more of the following values: <see cref="F:System.Globalization.CompareOptions.IgnoreCase" />, <see cref="F:System.Globalization.CompareOptions.IgnoreSymbols" />, <see cref="F:System.Globalization.CompareOptions.IgnoreNonSpace" />, <see cref="F:System.Globalization.CompareOptions.IgnoreWidth" />, and <see cref="F:System.Globalization.CompareOptions.IgnoreKanaType" />.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null.-or- <paramref name="suffix" /> is null. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="options" /> contains an invalid <see cref="T:System.Globalization.CompareOptions" /> value. </exception>
// Token: 0x06001270 RID: 4720 RVA: 0x000489D0 File Offset: 0x00046BD0
public virtual bool IsSuffix(string source, string suffix, CompareOptions options)
{
if (source == null)
{
throw new ArgumentNullException("source");
}
if (suffix == null)
{
throw new ArgumentNullException("suffix");
}
if (CompareInfo.UseManagedCollation)
{
return this.collator.IsSuffix(source, suffix, options);
}
return source.Length >= suffix.Length && this.Compare(source, source.Length - suffix.Length, suffix.Length, suffix, 0, suffix.Length, options) == 0;
}
/// <summary>Searches for the specified character and returns the zero-based index of the last occurrence within the entire source string.</summary>
/// <returns>The zero-based index of the last occurrence of <paramref name="value" /> within the entire <paramref name="source" />, if found; otherwise, -1.</returns>
/// <param name="source">The string to search. </param>
/// <param name="value">The character to locate within <paramref name="source" />. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null. </exception>
// Token: 0x06001271 RID: 4721 RVA: 0x00048A54 File Offset: 0x00046C54
public virtual int LastIndexOf(string source, char value)
{
return this.LastIndexOf(source, value, source.Length - 1, source.Length, CompareOptions.None);
}
/// <summary>Searches for the specified substring and returns the zero-based index of the last occurrence within the entire source string.</summary>
/// <returns>The zero-based index of the last occurrence of <paramref name="value" /> within the entire <paramref name="source" />, if found; otherwise, -1.</returns>
/// <param name="source">The string to search. </param>
/// <param name="value">The string to locate within <paramref name="source" />. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null.-or- <paramref name="value" /> is null. </exception>
// Token: 0x06001272 RID: 4722 RVA: 0x00048A78 File Offset: 0x00046C78
public virtual int LastIndexOf(string source, string value)
{
return this.LastIndexOf(source, value, source.Length - 1, source.Length, CompareOptions.None);
}
/// <summary>Searches for the specified character and returns the zero-based index of the last occurrence within the entire source string using the specified <see cref="T:System.Globalization.CompareOptions" /> value.</summary>
/// <returns>The zero-based index of the last occurrence of <paramref name="value" /> within the entire <paramref name="source" /> using the specified <see cref="T:System.Globalization.CompareOptions" /> value, if found; otherwise, -1.</returns>
/// <param name="source">The string to search. </param>
/// <param name="value">The character to locate within <paramref name="source" />. </param>
/// <param name="options">The <see cref="T:System.Globalization.CompareOptions" /> value that defines how <paramref name="source" /> and <paramref name="value" /> should be compared. <paramref name="options" /> is either the value <see cref="F:System.Globalization.CompareOptions.Ordinal" /> used by itself, or the bitwise combination of one or more of the following values: <see cref="F:System.Globalization.CompareOptions.IgnoreCase" />, <see cref="F:System.Globalization.CompareOptions.IgnoreSymbols" />, <see cref="F:System.Globalization.CompareOptions.IgnoreNonSpace" />, <see cref="F:System.Globalization.CompareOptions.IgnoreWidth" />, and <see cref="F:System.Globalization.CompareOptions.IgnoreKanaType" />.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="options" /> contains an invalid <see cref="T:System.Globalization.CompareOptions" /> value. </exception>
// Token: 0x06001273 RID: 4723 RVA: 0x00048A9C File Offset: 0x00046C9C
public virtual int LastIndexOf(string source, char value, CompareOptions options)
{
return this.LastIndexOf(source, value, source.Length - 1, source.Length, options);
}
/// <summary>Searches for the specified character and returns the zero-based index of the last occurrence within the section of the source string that extends from the beginning of the string to the specified index.</summary>
/// <returns>The zero-based index of the last occurrence of <paramref name="value" /> within the section of <paramref name="source" /> that extends from the beginning of <paramref name="source" /> to <paramref name="startIndex" />, if found; otherwise, -1.</returns>
/// <param name="source">The string to search. </param>
/// <param name="value">The character to locate within <paramref name="source" />. </param>
/// <param name="startIndex">The zero-based starting index of the backward search. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="startIndex" /> is outside the range of valid indexes for <paramref name="source" />. </exception>
// Token: 0x06001274 RID: 4724 RVA: 0x00048AC0 File Offset: 0x00046CC0
public virtual int LastIndexOf(string source, char value, int startIndex)
{
return this.LastIndexOf(source, value, startIndex, startIndex + 1, CompareOptions.None);
}
/// <summary>Searches for the specified substring and returns the zero-based index of the last occurrence within the entire source string using the specified <see cref="T:System.Globalization.CompareOptions" /> value.</summary>
/// <returns>The zero-based index of the last occurrence of <paramref name="value" /> within the entire <paramref name="source" /> using the specified <see cref="T:System.Globalization.CompareOptions" /> value, if found; otherwise, -1.</returns>
/// <param name="source">The string to search. </param>
/// <param name="value">The string to locate within <paramref name="source" />. </param>
/// <param name="options">The <see cref="T:System.Globalization.CompareOptions" /> value that defines how <paramref name="source" /> and <paramref name="value" /> should be compared. <paramref name="options" /> is either the value <see cref="F:System.Globalization.CompareOptions.Ordinal" /> used by itself, or the bitwise combination of one or more of the following values: <see cref="F:System.Globalization.CompareOptions.IgnoreCase" />, <see cref="F:System.Globalization.CompareOptions.IgnoreSymbols" />, <see cref="F:System.Globalization.CompareOptions.IgnoreNonSpace" />, <see cref="F:System.Globalization.CompareOptions.IgnoreWidth" />, and <see cref="F:System.Globalization.CompareOptions.IgnoreKanaType" />.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null.-or- <paramref name="value" /> is null. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="options" /> contains an invalid <see cref="T:System.Globalization.CompareOptions" /> value. </exception>
// Token: 0x06001275 RID: 4725 RVA: 0x00048AD0 File Offset: 0x00046CD0
public virtual int LastIndexOf(string source, string value, CompareOptions options)
{
return this.LastIndexOf(source, value, source.Length - 1, source.Length, options);
}
/// <summary>Searches for the specified substring and returns the zero-based index of the last occurrence within the section of the source string that extends from the beginning of the string to the specified index.</summary>
/// <returns>The zero-based index of the last occurrence of <paramref name="value" /> within the section of <paramref name="source" /> that extends from the beginning of <paramref name="source" /> to <paramref name="startIndex" />, if found; otherwise, -1.</returns>
/// <param name="source">The string to search. </param>
/// <param name="value">The string to locate within <paramref name="source" />. </param>
/// <param name="startIndex">The zero-based starting index of the backward search. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null.-or- <paramref name="value" /> is null. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="startIndex" /> is outside the range of valid indexes for <paramref name="source" />. </exception>
// Token: 0x06001276 RID: 4726 RVA: 0x00048AF4 File Offset: 0x00046CF4
public virtual int LastIndexOf(string source, string value, int startIndex)
{
return this.LastIndexOf(source, value, startIndex, startIndex + 1, CompareOptions.None);
}
/// <summary>Searches for the specified character and returns the zero-based index of the last occurrence within the section of the source string that extends from the beginning of the string to the specified index using the specified <see cref="T:System.Globalization.CompareOptions" /> value.</summary>
/// <returns>The zero-based index of the last occurrence of <paramref name="value" /> within the section of <paramref name="source" /> that extends from the beginning of <paramref name="source" /> to <paramref name="startIndex" /> using the specified <see cref="T:System.Globalization.CompareOptions" /> value, if found; otherwise, -1.</returns>
/// <param name="source">The string to search. </param>
/// <param name="value">The character to locate within <paramref name="source" />. </param>
/// <param name="startIndex">The zero-based starting index of the backward search. </param>
/// <param name="options">The <see cref="T:System.Globalization.CompareOptions" /> value that defines how <paramref name="source" /> and <paramref name="value" /> should be compared. <paramref name="options" /> is either the value <see cref="F:System.Globalization.CompareOptions.Ordinal" /> used by itself, or the bitwise combination of one or more of the following values: <see cref="F:System.Globalization.CompareOptions.IgnoreCase" />, <see cref="F:System.Globalization.CompareOptions.IgnoreSymbols" />, <see cref="F:System.Globalization.CompareOptions.IgnoreNonSpace" />, <see cref="F:System.Globalization.CompareOptions.IgnoreWidth" />, and <see cref="F:System.Globalization.CompareOptions.IgnoreKanaType" />.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="startIndex" /> is outside the range of valid indexes for <paramref name="source" />. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="options" /> contains an invalid <see cref="T:System.Globalization.CompareOptions" /> value. </exception>
// Token: 0x06001277 RID: 4727 RVA: 0x00048B04 File Offset: 0x00046D04
public virtual int LastIndexOf(string source, char value, int startIndex, CompareOptions options)
{
return this.LastIndexOf(source, value, startIndex, startIndex + 1, options);
}
/// <summary>Searches for the specified character and returns the zero-based index of the last occurrence within the section of the source string that contains the specified number of elements and ends at the specified index.</summary>
/// <returns>The zero-based index of the last occurrence of <paramref name="value" /> within the section of <paramref name="source" /> that contains the number of elements specified by <paramref name="count" /> and ends at <paramref name="startIndex" />, if found; otherwise, -1.</returns>
/// <param name="source">The string to search. </param>
/// <param name="value">The character to locate within <paramref name="source" />. </param>
/// <param name="startIndex">The zero-based starting index of the backward search. </param>
/// <param name="count">The number of elements in the section to search. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="startIndex" /> is outside the range of valid indexes for <paramref name="source" />.-or- <paramref name="count" /> is less than zero.-or- <paramref name="startIndex" /> and <paramref name="count" /> do not specify a valid section in <paramref name="source" />. </exception>
// Token: 0x06001278 RID: 4728 RVA: 0x00048B14 File Offset: 0x00046D14
public virtual int LastIndexOf(string source, char value, int startIndex, int count)
{
return this.LastIndexOf(source, value, startIndex, count, CompareOptions.None);
}
/// <summary>Searches for the specified substring and returns the zero-based index of the last occurrence within the section of the source string that extends from the beginning of the string to the specified index using the specified <see cref="T:System.Globalization.CompareOptions" /> value.</summary>
/// <returns>The zero-based index of the last occurrence of <paramref name="value" /> within the section of <paramref name="source" /> that extends from the beginning of <paramref name="source" /> to <paramref name="startIndex" /> using the specified <see cref="T:System.Globalization.CompareOptions" /> value, if found; otherwise, -1.</returns>
/// <param name="source">The string to search. </param>
/// <param name="value">The string to locate within <paramref name="source" />. </param>
/// <param name="startIndex">The zero-based starting index of the backward search. </param>
/// <param name="options">The <see cref="T:System.Globalization.CompareOptions" /> value that defines how <paramref name="source" /> and <paramref name="value" /> should be compared. <paramref name="options" /> is either the value <see cref="F:System.Globalization.CompareOptions.Ordinal" /> used by itself, or the bitwise combination of one or more of the following values: <see cref="F:System.Globalization.CompareOptions.IgnoreCase" />, <see cref="F:System.Globalization.CompareOptions.IgnoreSymbols" />, <see cref="F:System.Globalization.CompareOptions.IgnoreNonSpace" />, <see cref="F:System.Globalization.CompareOptions.IgnoreWidth" />, and <see cref="F:System.Globalization.CompareOptions.IgnoreKanaType" />.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null.-or- <paramref name="value" /> is null. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="startIndex" /> is outside the range of valid indexes for <paramref name="source" />. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="options" /> contains an invalid <see cref="T:System.Globalization.CompareOptions" /> value. </exception>
// Token: 0x06001279 RID: 4729 RVA: 0x00048B24 File Offset: 0x00046D24
public virtual int LastIndexOf(string source, string value, int startIndex, CompareOptions options)
{
return this.LastIndexOf(source, value, startIndex, startIndex + 1, options);
}
/// <summary>Searches for the specified substring and returns the zero-based index of the last occurrence within the section of the source string that contains the specified number of elements and ends at the specified index.</summary>
/// <returns>The zero-based index of the last occurrence of <paramref name="value" /> within the section of <paramref name="source" /> that contains the number of elements specified by <paramref name="count" /> and ends at <paramref name="startIndex" />, if found; otherwise, -1.</returns>
/// <param name="source">The string to search. </param>
/// <param name="value">The string to locate within <paramref name="source" />. </param>
/// <param name="startIndex">The zero-based starting index of the backward search. </param>
/// <param name="count">The number of elements in the section to search. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null.-or- <paramref name="value" /> is null. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="startIndex" /> is outside the range of valid indexes for <paramref name="source" />.-or- <paramref name="count" /> is less than zero.-or- <paramref name="startIndex" /> and <paramref name="count" /> do not specify a valid section in <paramref name="source" />. </exception>
// Token: 0x0600127A RID: 4730 RVA: 0x00048B34 File Offset: 0x00046D34
public virtual int LastIndexOf(string source, string value, int startIndex, int count)
{
return this.LastIndexOf(source, value, startIndex, count, CompareOptions.None);
}
/// <summary>Searches for the specified character and returns the zero-based index of the last occurrence within the section of the source string that contains the specified number of elements and ends at the specified index using the specified <see cref="T:System.Globalization.CompareOptions" /> value.</summary>
/// <returns>The zero-based index of the last occurrence of <paramref name="value" /> within the section of <paramref name="source" /> that contains the number of elements specified by <paramref name="count" /> and ends at <paramref name="startIndex" /> using the specified <see cref="T:System.Globalization.CompareOptions" /> value, if found; otherwise, -1.</returns>
/// <param name="source">The string to search. </param>
/// <param name="value">The character to locate within <paramref name="source" />. </param>
/// <param name="startIndex">The zero-based starting index of the backward search. </param>
/// <param name="count">The number of elements in the section to search. </param>
/// <param name="options">The <see cref="T:System.Globalization.CompareOptions" /> value that defines how <paramref name="source" /> and <paramref name="value" /> should be compared. <paramref name="options" /> is either the value <see cref="F:System.Globalization.CompareOptions.Ordinal" /> used by itself, or the bitwise combination of one or more of the following values: <see cref="F:System.Globalization.CompareOptions.IgnoreCase" />, <see cref="F:System.Globalization.CompareOptions.IgnoreSymbols" />, <see cref="F:System.Globalization.CompareOptions.IgnoreNonSpace" />, <see cref="F:System.Globalization.CompareOptions.IgnoreWidth" />, and <see cref="F:System.Globalization.CompareOptions.IgnoreKanaType" />.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="startIndex" /> is outside the range of valid indexes for <paramref name="source" />.-or- <paramref name="count" /> is less than zero.-or- <paramref name="startIndex" /> and <paramref name="count" /> do not specify a valid section in <paramref name="source" />. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="options" /> contains an invalid <see cref="T:System.Globalization.CompareOptions" /> value. </exception>
// Token: 0x0600127B RID: 4731 RVA: 0x00048B44 File Offset: 0x00046D44
public virtual int LastIndexOf(string source, char value, int startIndex, int count, CompareOptions options)
{
if (source == null)
{
throw new ArgumentNullException("source");
}
if (startIndex < 0)
{
throw new ArgumentOutOfRangeException("startIndex");
}
if (count < 0 || startIndex - count < -1)
{
throw new ArgumentOutOfRangeException("count");
}
if ((options & (CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace | CompareOptions.IgnoreSymbols | CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.Ordinal | CompareOptions.OrdinalIgnoreCase)) != options)
{
throw new ArgumentException("options");
}
if (count == 0)
{
return -1;
}
if ((options & CompareOptions.Ordinal) != CompareOptions.None)
{
for (int i = startIndex; i > startIndex - count; i--)
{
if (source[i] == value)
{
return i;
}
}
return -1;
}
return this.internal_index_switch(source, startIndex, count, value, options, false);
}
/// <summary>Searches for the specified substring and returns the zero-based index of the last occurrence within the section of the source string that contains the specified number of elements and ends at the specified index using the specified <see cref="T:System.Globalization.CompareOptions" /> value.</summary>
/// <returns>The zero-based index of the last occurrence of <paramref name="value" /> within the section of <paramref name="source" /> that contains the number of elements specified by <paramref name="count" /> and ends at <paramref name="startIndex" /> using the specified <see cref="T:System.Globalization.CompareOptions" /> value, if found; otherwise, -1.</returns>
/// <param name="source">The string to search. </param>
/// <param name="value">The string to locate within <paramref name="source" />. </param>
/// <param name="startIndex">The zero-based starting index of the backward search. </param>
/// <param name="count">The number of elements in the section to search. </param>
/// <param name="options">The <see cref="T:System.Globalization.CompareOptions" /> value that defines how <paramref name="source" /> and <paramref name="value" /> should be compared. <paramref name="options" /> is either the value <see cref="F:System.Globalization.CompareOptions.Ordinal" /> used by itself, or the bitwise combination of one or more of the following values: <see cref="F:System.Globalization.CompareOptions.IgnoreCase" />, <see cref="F:System.Globalization.CompareOptions.IgnoreSymbols" />, <see cref="F:System.Globalization.CompareOptions.IgnoreNonSpace" />, <see cref="F:System.Globalization.CompareOptions.IgnoreWidth" />, and <see cref="F:System.Globalization.CompareOptions.IgnoreKanaType" />.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null.-or- <paramref name="value" /> is null. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="startIndex" /> is outside the range of valid indexes for <paramref name="source" />.-or- <paramref name="count" /> is less than zero.-or- <paramref name="startIndex" /> and <paramref name="count" /> do not specify a valid section in <paramref name="source" />. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="options" /> contains an invalid <see cref="T:System.Globalization.CompareOptions" /> value. </exception>
// Token: 0x0600127C RID: 4732 RVA: 0x00048BF8 File Offset: 0x00046DF8
public virtual int LastIndexOf(string source, string value, int startIndex, int count, CompareOptions options)
{
if (source == null)
{
throw new ArgumentNullException("source");
}
if (value == null)
{
throw new ArgumentNullException("value");
}
if (startIndex < 0)
{
throw new ArgumentOutOfRangeException("startIndex");
}
if (count < 0 || startIndex - count < -1)
{
throw new ArgumentOutOfRangeException("count");
}
if ((options & (CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace | CompareOptions.IgnoreSymbols | CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.Ordinal | CompareOptions.OrdinalIgnoreCase)) != options)
{
throw new ArgumentException("options");
}
if (count == 0)
{
return -1;
}
if (value.Length == 0)
{
return 0;
}
return this.internal_index_switch(source, startIndex, count, value, options, false);
}
/// <summary>Indicates whether a specified Unicode character is sortable.</summary>
/// <returns>true if the <paramref name="ch" /> parameter is sortable; otherwise, false.</returns>
/// <param name="ch">A Unicode character.</param>
// Token: 0x0600127D RID: 4733 RVA: 0x00048C98 File Offset: 0x00046E98
[ComVisible(false)]
public static bool IsSortable(char ch)
{
return MSCompatUnicodeTable.IsSortable((int)ch);
}
/// <summary>Indicates whether a specified Unicode string is sortable.</summary>
/// <returns>true if the <paramref name="str" /> parameter is not an empty string ("") and all the Unicode characters in <paramref name="str" /> are sortable; otherwise, false.</returns>
/// <param name="text">A string of zero or more Unicode characters.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="str" /> is null.</exception>
// Token: 0x0600127E RID: 4734 RVA: 0x00048CA0 File Offset: 0x00046EA0
[ComVisible(false)]
public static bool IsSortable(string text)
{
return MSCompatUnicodeTable.IsSortable(text);
}
/// <summary>Returns a string that represents the current <see cref="T:System.Globalization.CompareInfo" />.</summary>
/// <returns>A string that represents the current <see cref="T:System.Globalization.CompareInfo" />.</returns>
// Token: 0x0600127F RID: 4735 RVA: 0x00048CA8 File Offset: 0x00046EA8
public override string ToString()
{
return "CompareInfo - " + this.culture;
}
/// <summary>Gets the properly formed culture identifier for the current <see cref="T:System.Globalization.CompareInfo" />.</summary>
/// <returns>The properly formed culture identifier for the current <see cref="T:System.Globalization.CompareInfo" />.</returns>
// Token: 0x1700030D RID: 781
// (get) Token: 0x06001280 RID: 4736 RVA: 0x00048CC0 File Offset: 0x00046EC0
public int LCID
{
get
{
return this.culture;
}
}
/// <summary>Gets the name of the culture used for sorting operations by this <see cref="T:System.Globalization.CompareInfo" /> object.</summary>
/// <returns>The name of a culture.</returns>
// Token: 0x1700030E RID: 782
// (get) Token: 0x06001281 RID: 4737 RVA: 0x00048CC8 File Offset: 0x00046EC8
[ComVisible(false)]
public virtual string Name
{
get
{
return this.icu_name;
}
}
// Token: 0x040004C2 RID: 1218
private const CompareOptions ValidCompareOptions_NoStringSort = CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace | CompareOptions.IgnoreSymbols | CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.Ordinal | CompareOptions.OrdinalIgnoreCase;
// Token: 0x040004C3 RID: 1219
private const CompareOptions ValidCompareOptions = CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace | CompareOptions.IgnoreSymbols | CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.StringSort | CompareOptions.Ordinal | CompareOptions.OrdinalIgnoreCase;
// Token: 0x040004C4 RID: 1220
private static readonly bool useManagedCollation = Environment.internalGetEnvironmentVariable("MONO_DISABLE_MANAGED_COLLATION") != "yes" && MSCompatUnicodeTable.IsReady;
// Token: 0x040004C5 RID: 1221
private int culture;
// Token: 0x040004C6 RID: 1222
[NonSerialized]
private string icu_name;
// Token: 0x040004C7 RID: 1223
private int win32LCID;
// Token: 0x040004C8 RID: 1224
private string m_name;
// Token: 0x040004C9 RID: 1225
[NonSerialized]
private SimpleCollator collator;
// Token: 0x040004CA RID: 1226
private static Hashtable collators;
// Token: 0x040004CB RID: 1227
[NonSerialized]
private static object monitor = new object();
}
}
@@ -0,0 +1,41 @@
using System;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Defines the string comparison options to use with <see cref="T:System.Globalization.CompareInfo" />.</summary>
// Token: 0x0200017D RID: 381
[Flags]
[ComVisible(true)]
[Serializable]
public enum CompareOptions
{
/// <summary>Indicates the default option settings for string comparisons.</summary>
// Token: 0x040004CD RID: 1229
None = 0,
/// <summary>Indicates that the string comparison must ignore case.</summary>
// Token: 0x040004CE RID: 1230
IgnoreCase = 1,
/// <summary>Indicates that the string comparison must ignore nonspacing combining characters, such as diacritics. The Unicode Standard defines combining characters as characters that are combined with base characters to produce a new character. Nonspacing combining characters do not occupy a spacing position by themselves when rendered. For more information on nonspacing combining characters, see The Unicode Standard at the Unicode home page.</summary>
// Token: 0x040004CF RID: 1231
IgnoreNonSpace = 2,
/// <summary>Indicates that the string comparison must ignore symbols, such as white-space characters, punctuation, currency symbols, the percent sign, mathematical symbols, the ampersand, and so on.</summary>
// Token: 0x040004D0 RID: 1232
IgnoreSymbols = 4,
/// <summary>Indicates that the string comparison must ignore the Kana type. Kana type refers to Japanese hiragana and katakana characters, which represent phonetic sounds in the Japanese language. Hiragana is used for native Japanese expressions and words, while katakana is used for words borrowed from other languages, such as "computer" or "Internet". A phonetic sound can be expressed in both hiragana and katakana. If this value is selected, the hiragana character for one sound is considered equal to the katakana character for the same sound.</summary>
// Token: 0x040004D1 RID: 1233
IgnoreKanaType = 8,
/// <summary>Indicates that the string comparison must ignore the character width. For example, Japanese katakana characters can be written as full-width or half-width. If this value is selected, the katakana characters written as full-width are considered equal to the same characters written as half-width.</summary>
// Token: 0x040004D2 RID: 1234
IgnoreWidth = 16,
/// <summary>Indicates that the string comparison must use the string sort algorithm. In a string sort, the hyphen and the apostrophe, as well as other nonalphanumeric symbols, come before alphanumeric characters.</summary>
// Token: 0x040004D3 RID: 1235
StringSort = 536870912,
/// <summary>Indicates that the string comparison must use the Unicode values of each character, leading to a fast comparison but one that is culture-insensitive. A string starting with "U+xxxx" comes before a string starting with "U+yyyy", if xxxx is less than yyyy. This value cannot be combined with other <see cref="T:System.Globalization.CompareOptions" /> values and must be used alone.</summary>
// Token: 0x040004D4 RID: 1236
Ordinal = 1073741824,
/// <summary>String comparison must ignore case, then perform an ordinal comparison. This technique is equivalent to converting the string to uppercase using the invariant culture and then performing an ordinal comparison on the result.</summary>
// Token: 0x040004D5 RID: 1237
OrdinalIgnoreCase = 268435456
}
}
+1216
View File
@@ -0,0 +1,1216 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading;
namespace System.Globalization
{
/// <summary>Provides information about a specific culture (called a "locale" for unmanaged code development). The information includes the names for the culture, the writing system, the calendar used, and formatting for dates and sort strings.</summary>
// Token: 0x0200017E RID: 382
[ComVisible(true)]
[Serializable]
public class CultureInfo : ICloneable, IFormatProvider
{
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.CultureInfo" /> class based on the culture specified by the culture identifier.</summary>
/// <param name="culture">A predefined <see cref="T:System.Globalization.CultureInfo" /> identifier, <see cref="P:System.Globalization.CultureInfo.LCID" /> property of an existing <see cref="T:System.Globalization.CultureInfo" /> object, or Windows-only culture identifier. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="culture" /> is less than zero. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="culture" /> is not a valid culture identifier. -or-In .NET Compact Framework applications, <paramref name="culture" /> is not supported by the operating system of the device. </exception>
// Token: 0x06001282 RID: 4738 RVA: 0x00048CD0 File Offset: 0x00046ED0
public CultureInfo(int culture)
: this(culture, true)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.CultureInfo" /> class based on the culture specified by the culture identifier and on the Boolean that specifies whether to use the user-selected culture settings from the system.</summary>
/// <param name="culture">A predefined <see cref="T:System.Globalization.CultureInfo" /> identifier, <see cref="P:System.Globalization.CultureInfo.LCID" /> property of an existing <see cref="T:System.Globalization.CultureInfo" /> object, or Windows-only culture identifier. </param>
/// <param name="useUserOverride">A Boolean that denotes whether to use the user-selected culture settings (true) or the default culture settings (false). </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="culture" /> is less than zero. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="culture" /> is not a valid culture identifier.-or-In .NET Compact Framework applications, <paramref name="culture" /> is not supported by the operating system of the device. </exception>
// Token: 0x06001283 RID: 4739 RVA: 0x00048CDC File Offset: 0x00046EDC
public CultureInfo(int culture, bool useUserOverride)
: this(culture, useUserOverride, false)
{
}
// Token: 0x06001284 RID: 4740 RVA: 0x00048CE8 File Offset: 0x00046EE8
private CultureInfo(int culture, bool useUserOverride, bool read_only)
{
if (culture < 0)
{
throw new ArgumentOutOfRangeException("culture", "Positive number required.");
}
this.constructed = true;
this.m_isReadOnly = read_only;
this.m_useUserOverride = useUserOverride;
if (culture == 127)
{
this.ConstructInvariant(read_only);
return;
}
if (!this.ConstructInternalLocaleFromLcid(culture))
{
throw new ArgumentException(string.Format("Culture ID {0} (0x{0:X4}) is not a supported culture.", culture), "culture");
}
}
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.CultureInfo" /> class based on the culture specified by name.</summary>
/// <param name="name">A predefined <see cref="T:System.Globalization.CultureInfo" /> name, <see cref="P:System.Globalization.CultureInfo.Name" /> of an existing <see cref="T:System.Globalization.CultureInfo" />, or Windows-only culture name. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="name" /> is not a valid culture name. -or-In .NET Compact Framework applications, <paramref name="culture" /> is not supported by the operating system of the device.</exception>
// Token: 0x06001285 RID: 4741 RVA: 0x00048D60 File Offset: 0x00046F60
public CultureInfo(string name)
: this(name, true)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.CultureInfo" /> class based on the culture specified by name and on the Boolean that specifies whether to use the user-selected culture settings from the system.</summary>
/// <param name="name">A predefined <see cref="T:System.Globalization.CultureInfo" /> name, <see cref="P:System.Globalization.CultureInfo.Name" /> of an existing <see cref="T:System.Globalization.CultureInfo" />, or Windows-only culture name. </param>
/// <param name="useUserOverride">A Boolean that denotes whether to use the user-selected culture settings (true) or the default culture settings (false). </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="name" /> is not a valid culture name. -or-In .NET Compact Framework applications, <paramref name="culture" /> is not supported by the operating system of the device.</exception>
// Token: 0x06001286 RID: 4742 RVA: 0x00048D6C File Offset: 0x00046F6C
public CultureInfo(string name, bool useUserOverride)
: this(name, useUserOverride, false)
{
}
// Token: 0x06001287 RID: 4743 RVA: 0x00048D78 File Offset: 0x00046F78
private CultureInfo(string name, bool useUserOverride, bool read_only)
{
if (name == null)
{
throw new ArgumentNullException("name");
}
this.constructed = true;
this.m_isReadOnly = read_only;
this.m_useUserOverride = useUserOverride;
if (name.Length == 0)
{
this.ConstructInvariant(read_only);
return;
}
if (!this.ConstructInternalLocaleFromName(name.ToLowerInvariant()))
{
throw new ArgumentException("Culture name " + name + " is not supported.", "name");
}
}
// Token: 0x06001288 RID: 4744 RVA: 0x00048DF0 File Offset: 0x00046FF0
private CultureInfo()
{
this.constructed = true;
}
/// <summary>Gets the <see cref="T:System.Globalization.CultureInfo" /> that is culture-independent (invariant).</summary>
/// <returns>The <see cref="T:System.Globalization.CultureInfo" /> that is culture-independent (invariant).</returns>
// Token: 0x1700030F RID: 783
// (get) Token: 0x0600128A RID: 4746 RVA: 0x00048E34 File Offset: 0x00047034
public static CultureInfo InvariantCulture
{
get
{
return CultureInfo.invariant_culture_info;
}
}
/// <summary>Creates a <see cref="T:System.Globalization.CultureInfo" /> object that represents the specific culture that is associated with the specified name.</summary>
/// <returns>A <see cref="T:System.Globalization.CultureInfo" /> object that represents:The invariant culture, if <paramref name="name" /> is an empty string ("").-or- The specific culture associated with <paramref name="name" />, if <paramref name="name" /> is a neutral culture.-or- The culture specified by <paramref name="name" />, if <paramref name="name" /> is already a specific culture.</returns>
/// <param name="name">A predefined <see cref="T:System.Globalization.CultureInfo" /> name or the name of an existing <see cref="T:System.Globalization.CultureInfo" /> object. </param>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="name" /> is not a valid culture name.-or- The culture specified by <paramref name="name" /> does not have a specific culture associated with it. </exception>
/// <exception cref="T:System.NullReferenceException">
/// <paramref name="name" /> is null. </exception>
// Token: 0x0600128B RID: 4747 RVA: 0x00048E40 File Offset: 0x00047040
public static CultureInfo CreateSpecificCulture(string name)
{
if (name == null)
{
throw new ArgumentNullException("name");
}
if (name == string.Empty)
{
return CultureInfo.InvariantCulture;
}
CultureInfo cultureInfo = new CultureInfo();
if (!CultureInfo.ConstructInternalLocaleFromSpecificName(cultureInfo, name.ToLowerInvariant()))
{
throw new ArgumentException("Culture name " + name + " is not supported.", name);
}
return cultureInfo;
}
/// <summary>Gets the <see cref="T:System.Globalization.CultureInfo" /> that represents the culture used by the current thread.</summary>
/// <returns>The <see cref="T:System.Globalization.CultureInfo" /> that represents the culture used by the current thread.</returns>
// Token: 0x17000310 RID: 784
// (get) Token: 0x0600128C RID: 4748 RVA: 0x00048EA4 File Offset: 0x000470A4
public static CultureInfo CurrentCulture
{
get
{
return Thread.CurrentThread.CurrentCulture;
}
}
/// <summary>Gets the <see cref="T:System.Globalization.CultureInfo" /> that represents the current culture used by the Resource Manager to look up culture-specific resources at run time.</summary>
/// <returns>The <see cref="T:System.Globalization.CultureInfo" /> that represents the current culture used by the Resource Manager to look up culture-specific resources at run time.</returns>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x17000311 RID: 785
// (get) Token: 0x0600128D RID: 4749 RVA: 0x00048EB0 File Offset: 0x000470B0
public static CultureInfo CurrentUICulture
{
get
{
return Thread.CurrentThread.CurrentUICulture;
}
}
// Token: 0x0600128E RID: 4750 RVA: 0x00048EBC File Offset: 0x000470BC
internal static CultureInfo ConstructCurrentCulture()
{
CultureInfo cultureInfo = new CultureInfo();
if (!CultureInfo.ConstructInternalLocaleFromCurrentLocale(cultureInfo))
{
cultureInfo = CultureInfo.InvariantCulture;
}
CultureInfo.BootstrapCultureID = cultureInfo.cultureID;
return cultureInfo;
}
// Token: 0x0600128F RID: 4751 RVA: 0x00048EEC File Offset: 0x000470EC
internal static CultureInfo ConstructCurrentUICulture()
{
return CultureInfo.ConstructCurrentCulture();
}
// Token: 0x17000312 RID: 786
// (get) Token: 0x06001290 RID: 4752 RVA: 0x00048EF4 File Offset: 0x000470F4
internal string Territory
{
get
{
return this.territory;
}
}
/// <summary>Gets the culture identifier for the current <see cref="T:System.Globalization.CultureInfo" />.</summary>
/// <returns>The culture identifier for the current <see cref="T:System.Globalization.CultureInfo" />.</returns>
// Token: 0x17000313 RID: 787
// (get) Token: 0x06001291 RID: 4753 RVA: 0x00048EFC File Offset: 0x000470FC
public virtual int LCID
{
get
{
return this.cultureID;
}
}
/// <summary>Gets the culture name in the format "&lt;languagecode2&gt;-&lt;country/regioncode2&gt;".</summary>
/// <returns>The culture name in the format "&lt;languagecode2&gt;-&lt;country/regioncode2&gt;", where &lt;languagecode2&gt; is a lowercase two-letter code derived from ISO 639-1 and &lt;country/regioncode2&gt; is an uppercase two-letter code derived from ISO 3166.</returns>
// Token: 0x17000314 RID: 788
// (get) Token: 0x06001292 RID: 4754 RVA: 0x00048F04 File Offset: 0x00047104
public virtual string Name
{
get
{
return this.m_name;
}
}
/// <summary>Gets the culture name, consisting of the language, the country/region, and the optional script, that the culture is set to display.</summary>
/// <returns>The culture name. consisting of the full name of the language, the full name of the country/region, and the optional script. The format is discussed in the description of the <see cref="T:System.Globalization.CultureInfo" /> class.</returns>
// Token: 0x17000315 RID: 789
// (get) Token: 0x06001293 RID: 4755 RVA: 0x00048F0C File Offset: 0x0004710C
public virtual string NativeName
{
get
{
if (!this.constructed)
{
this.Construct();
}
return this.nativename;
}
}
/// <summary>Gets the default calendar used by the culture.</summary>
/// <returns>A <see cref="T:System.Globalization.Calendar" /> that represents the default calendar used by the culture.</returns>
// Token: 0x17000316 RID: 790
// (get) Token: 0x06001294 RID: 4756 RVA: 0x00048F28 File Offset: 0x00047128
public virtual Calendar Calendar
{
get
{
return this.DateTimeFormat.Calendar;
}
}
/// <summary>Gets the list of calendars that can be used by the culture.</summary>
/// <returns>An array of type <see cref="T:System.Globalization.Calendar" /> that represents the calendars that can be used by the culture represented by the current <see cref="T:System.Globalization.CultureInfo" />.</returns>
// Token: 0x17000317 RID: 791
// (get) Token: 0x06001295 RID: 4757 RVA: 0x00048F38 File Offset: 0x00047138
public virtual Calendar[] OptionalCalendars
{
get
{
if (this.optional_calendars == null)
{
lock (this)
{
if (this.optional_calendars == null)
{
this.ConstructCalendars();
}
}
}
return this.optional_calendars;
}
}
/// <summary>Gets the <see cref="T:System.Globalization.CultureInfo" /> that represents the parent culture of the current <see cref="T:System.Globalization.CultureInfo" />.</summary>
/// <returns>The <see cref="T:System.Globalization.CultureInfo" /> that represents the parent culture of the current <see cref="T:System.Globalization.CultureInfo" />.</returns>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x17000318 RID: 792
// (get) Token: 0x06001296 RID: 4758 RVA: 0x00048F98 File Offset: 0x00047198
public virtual CultureInfo Parent
{
get
{
if (this.parent_culture == null)
{
if (!this.constructed)
{
this.Construct();
}
if (this.parent_lcid == this.cultureID)
{
return null;
}
if (this.parent_lcid == 127)
{
this.parent_culture = CultureInfo.InvariantCulture;
}
else if (this.cultureID == 127)
{
this.parent_culture = this;
}
else
{
this.parent_culture = new CultureInfo(this.parent_lcid);
}
}
return this.parent_culture;
}
}
/// <summary>Gets the <see cref="T:System.Globalization.TextInfo" /> that defines the writing system associated with the culture.</summary>
/// <returns>The <see cref="T:System.Globalization.TextInfo" /> that defines the writing system associated with the culture.</returns>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x17000319 RID: 793
// (get) Token: 0x06001297 RID: 4759 RVA: 0x00049024 File Offset: 0x00047224
public virtual TextInfo TextInfo
{
get
{
if (this.textInfo == null)
{
if (!this.constructed)
{
this.Construct();
}
lock (this)
{
if (this.textInfo == null)
{
this.textInfo = this.CreateTextInfo(this.m_isReadOnly);
}
}
}
return this.textInfo;
}
}
/// <summary>Gets the ISO 639-2 three-letter code for the language of the current <see cref="T:System.Globalization.CultureInfo" />.</summary>
/// <returns>The ISO 639-2 three-letter code for the language of the current <see cref="T:System.Globalization.CultureInfo" />.</returns>
// Token: 0x1700031A RID: 794
// (get) Token: 0x06001298 RID: 4760 RVA: 0x000490A8 File Offset: 0x000472A8
public virtual string ThreeLetterISOLanguageName
{
get
{
if (!this.constructed)
{
this.Construct();
}
return this.iso3lang;
}
}
/// <summary>Gets the three-letter code for the language as defined in the Windows API.</summary>
/// <returns>The three-letter code for the language as defined in the Windows API.</returns>
// Token: 0x1700031B RID: 795
// (get) Token: 0x06001299 RID: 4761 RVA: 0x000490C4 File Offset: 0x000472C4
public virtual string ThreeLetterWindowsLanguageName
{
get
{
if (!this.constructed)
{
this.Construct();
}
return this.win3lang;
}
}
/// <summary>Gets the ISO 639-1 two-letter code for the language of the current <see cref="T:System.Globalization.CultureInfo" />.</summary>
/// <returns>The ISO 639-1 two-letter code for the language of the current <see cref="T:System.Globalization.CultureInfo" />.</returns>
// Token: 0x1700031C RID: 796
// (get) Token: 0x0600129A RID: 4762 RVA: 0x000490E0 File Offset: 0x000472E0
public virtual string TwoLetterISOLanguageName
{
get
{
if (!this.constructed)
{
this.Construct();
}
return this.iso2lang;
}
}
/// <summary>Gets a value indicating whether the current <see cref="T:System.Globalization.CultureInfo" /> uses the user-selected culture settings.</summary>
/// <returns>true if the current <see cref="T:System.Globalization.CultureInfo" /> uses the user-selected culture settings; otherwise, false.</returns>
// Token: 0x1700031D RID: 797
// (get) Token: 0x0600129B RID: 4763 RVA: 0x000490FC File Offset: 0x000472FC
public bool UseUserOverride
{
get
{
return this.m_useUserOverride;
}
}
// Token: 0x1700031E RID: 798
// (get) Token: 0x0600129C RID: 4764 RVA: 0x00049104 File Offset: 0x00047304
internal string IcuName
{
get
{
if (!this.constructed)
{
this.Construct();
}
return this.icu_name;
}
}
/// <summary>Refreshes cached culture-related information.</summary>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x0600129D RID: 4765 RVA: 0x00049120 File Offset: 0x00047320
public void ClearCachedData()
{
Thread.CurrentThread.CurrentCulture = null;
Thread.CurrentThread.CurrentUICulture = null;
}
/// <summary>Creates a copy of the current <see cref="T:System.Globalization.CultureInfo" />.</summary>
/// <returns>A copy of the current <see cref="T:System.Globalization.CultureInfo" />.</returns>
// Token: 0x0600129E RID: 4766 RVA: 0x00049138 File Offset: 0x00047338
public virtual object Clone()
{
if (!this.constructed)
{
this.Construct();
}
CultureInfo cultureInfo = (CultureInfo)base.MemberwiseClone();
cultureInfo.m_isReadOnly = false;
cultureInfo.cached_serialized_form = null;
if (!this.IsNeutralCulture)
{
cultureInfo.NumberFormat = (NumberFormatInfo)this.NumberFormat.Clone();
cultureInfo.DateTimeFormat = (DateTimeFormatInfo)this.DateTimeFormat.Clone();
}
return cultureInfo;
}
/// <summary>Determines whether the specified object is the same culture as the current <see cref="T:System.Globalization.CultureInfo" />.</summary>
/// <returns>true if <paramref name="value" /> is the same culture as the current <see cref="T:System.Globalization.CultureInfo" />; otherwise, false.</returns>
/// <param name="value">The object to compare with the current <see cref="T:System.Globalization.CultureInfo" />. </param>
// Token: 0x0600129F RID: 4767 RVA: 0x000491A8 File Offset: 0x000473A8
public override bool Equals(object value)
{
CultureInfo cultureInfo = value as CultureInfo;
return cultureInfo != null && cultureInfo.cultureID == this.cultureID;
}
/// <summary>Gets the list of supported cultures filtered by the specified <see cref="T:System.Globalization.CultureTypes" /> parameter.</summary>
/// <returns>An array of type <see cref="T:System.Globalization.CultureInfo" /> that contains the cultures specified by the <paramref name="types" /> parameter. The array of cultures is unsorted.</returns>
/// <param name="types">A bitwise combination of <see cref="T:System.Globalization.CultureTypes" /> values that filter the cultures to retrieve. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="types" /> specifies an invalid combination of <see cref="T:System.Globalization.CultureTypes" /> values.</exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x060012A0 RID: 4768 RVA: 0x000491D4 File Offset: 0x000473D4
public static CultureInfo[] GetCultures(CultureTypes types)
{
bool flag = (types & CultureTypes.NeutralCultures) != (CultureTypes)0;
bool flag2 = (types & CultureTypes.SpecificCultures) != (CultureTypes)0;
bool flag3 = (types & CultureTypes.InstalledWin32Cultures) != (CultureTypes)0;
CultureInfo[] array = CultureInfo.internal_get_cultures(flag, flag2, flag3);
if (flag && array.Length > 0 && array[0] == null)
{
array[0] = (CultureInfo)CultureInfo.InvariantCulture.Clone();
}
return array;
}
/// <summary>Serves as a hash function for the current <see cref="T:System.Globalization.CultureInfo" />, suitable for hashing algorithms and data structures, such as a hash table.</summary>
/// <returns>A hash code for the current <see cref="T:System.Globalization.CultureInfo" />.</returns>
// Token: 0x060012A1 RID: 4769 RVA: 0x00049234 File Offset: 0x00047434
public override int GetHashCode()
{
return this.cultureID;
}
/// <summary>Returns a read-only wrapper around the specified <see cref="T:System.Globalization.CultureInfo" />.</summary>
/// <returns>A read-only <see cref="T:System.Globalization.CultureInfo" /> wrapper around <paramref name="ci" />.</returns>
/// <param name="ci">The <see cref="T:System.Globalization.CultureInfo" /> to wrap. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="ci" /> is null. </exception>
// Token: 0x060012A2 RID: 4770 RVA: 0x0004923C File Offset: 0x0004743C
public static CultureInfo ReadOnly(CultureInfo ci)
{
if (ci == null)
{
throw new ArgumentNullException("ci");
}
if (ci.m_isReadOnly)
{
return ci;
}
CultureInfo cultureInfo = (CultureInfo)ci.Clone();
cultureInfo.m_isReadOnly = true;
if (cultureInfo.numInfo != null)
{
cultureInfo.numInfo = NumberFormatInfo.ReadOnly(cultureInfo.numInfo);
}
if (cultureInfo.dateTimeInfo != null)
{
cultureInfo.dateTimeInfo = DateTimeFormatInfo.ReadOnly(cultureInfo.dateTimeInfo);
}
if (cultureInfo.textInfo != null)
{
cultureInfo.textInfo = TextInfo.ReadOnly(cultureInfo.textInfo);
}
return cultureInfo;
}
/// <summary>Returns a string containing the name of the current <see cref="T:System.Globalization.CultureInfo" /> in the format "&lt;languagecode2&gt;-&lt;country/regioncode2&gt;".</summary>
/// <returns>A string containing the name of the current <see cref="T:System.Globalization.CultureInfo" />.</returns>
// Token: 0x060012A3 RID: 4771 RVA: 0x000492E4 File Offset: 0x000474E4
public override string ToString()
{
return this.m_name;
}
/// <summary>Gets the <see cref="T:System.Globalization.CompareInfo" /> that defines how to compare strings for the culture.</summary>
/// <returns>The <see cref="T:System.Globalization.CompareInfo" /> that defines how to compare strings for the culture.</returns>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x1700031F RID: 799
// (get) Token: 0x060012A4 RID: 4772 RVA: 0x000492EC File Offset: 0x000474EC
public virtual CompareInfo CompareInfo
{
get
{
if (this.compareInfo == null)
{
if (!this.constructed)
{
this.Construct();
}
lock (this)
{
if (this.compareInfo == null)
{
this.compareInfo = new CompareInfo(this);
}
}
}
return this.compareInfo;
}
}
// Token: 0x060012A5 RID: 4773 RVA: 0x0004936C File Offset: 0x0004756C
internal static bool IsIDNeutralCulture(int lcid)
{
bool flag;
if (!CultureInfo.internal_is_lcid_neutral(lcid, out flag))
{
throw new ArgumentException(string.Format("Culture id 0x{:x4} is not supported.", lcid));
}
return flag;
}
/// <summary>Gets a value indicating whether the current <see cref="T:System.Globalization.CultureInfo" /> represents a neutral culture.</summary>
/// <returns>true if the current <see cref="T:System.Globalization.CultureInfo" /> represents a neutral culture; otherwise, false.</returns>
// Token: 0x17000320 RID: 800
// (get) Token: 0x060012A6 RID: 4774 RVA: 0x000493A0 File Offset: 0x000475A0
public virtual bool IsNeutralCulture
{
get
{
if (!this.constructed)
{
this.Construct();
}
return this.cultureID != 127 && ((this.cultureID & 65280) == 0 || this.specific_lcid == 0);
}
}
// Token: 0x060012A7 RID: 4775 RVA: 0x000493E0 File Offset: 0x000475E0
internal void CheckNeutral()
{
if (this.IsNeutralCulture)
{
throw new NotSupportedException("Culture \"" + this.m_name + "\" is a neutral culture. It can not be used in formatting and parsing and therefore cannot be set as the thread's current culture.");
}
}
/// <summary>Gets or sets a <see cref="T:System.Globalization.NumberFormatInfo" /> that defines the culturally appropriate format of displaying numbers, currency, and percentage.</summary>
/// <returns>A <see cref="T:System.Globalization.NumberFormatInfo" /> that defines the culturally appropriate format of displaying numbers, currency, and percentage.</returns>
/// <exception cref="T:System.ArgumentNullException">The property is set to null. </exception>
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Globalization.CultureInfo" /> is for a neutral culture. </exception>
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Globalization.CultureInfo.NumberFormat" /> property or any of the <see cref="T:System.Globalization.NumberFormatInfo" /> properties is set, and the <see cref="T:System.Globalization.CultureInfo" /> is read-only. </exception>
// Token: 0x17000321 RID: 801
// (get) Token: 0x060012A8 RID: 4776 RVA: 0x00049414 File Offset: 0x00047614
// (set) Token: 0x060012A9 RID: 4777 RVA: 0x000494A4 File Offset: 0x000476A4
public virtual NumberFormatInfo NumberFormat
{
get
{
if (!this.constructed)
{
this.Construct();
}
this.CheckNeutral();
if (this.numInfo == null)
{
lock (this)
{
if (this.numInfo == null)
{
this.numInfo = new NumberFormatInfo(this.m_isReadOnly);
this.construct_number_format();
}
}
}
return this.numInfo;
}
set
{
if (!this.constructed)
{
this.Construct();
}
if (this.m_isReadOnly)
{
throw new InvalidOperationException(CultureInfo.MSG_READONLY);
}
if (value == null)
{
throw new ArgumentNullException("NumberFormat");
}
this.numInfo = value;
}
}
/// <summary>Gets or sets a <see cref="T:System.Globalization.DateTimeFormatInfo" /> that defines the culturally appropriate format of displaying dates and times.</summary>
/// <returns>A <see cref="T:System.Globalization.DateTimeFormatInfo" /> that defines the culturally appropriate format of displaying dates and times.</returns>
/// <exception cref="T:System.ArgumentNullException">The property is set to null. </exception>
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Globalization.CultureInfo" /> is for a neutral culture. </exception>
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Globalization.CultureInfo.DateTimeFormat" /> property or any of the <see cref="T:System.Globalization.DateTimeFormatInfo" /> properties is set, and the <see cref="T:System.Globalization.CultureInfo" /> is read-only. </exception>
// Token: 0x17000322 RID: 802
// (get) Token: 0x060012AA RID: 4778 RVA: 0x000494F4 File Offset: 0x000476F4
// (set) Token: 0x060012AB RID: 4779 RVA: 0x000495A4 File Offset: 0x000477A4
public virtual DateTimeFormatInfo DateTimeFormat
{
get
{
if (!this.constructed)
{
this.Construct();
}
this.CheckNeutral();
if (this.dateTimeInfo == null)
{
lock (this)
{
if (this.dateTimeInfo == null)
{
this.dateTimeInfo = new DateTimeFormatInfo(this.m_isReadOnly);
this.construct_datetime_format();
if (this.optional_calendars != null)
{
this.dateTimeInfo.Calendar = this.optional_calendars[0];
}
}
}
}
return this.dateTimeInfo;
}
set
{
if (!this.constructed)
{
this.Construct();
}
if (this.m_isReadOnly)
{
throw new InvalidOperationException(CultureInfo.MSG_READONLY);
}
if (value == null)
{
throw new ArgumentNullException("DateTimeFormat");
}
this.dateTimeInfo = value;
}
}
/// <summary>Gets the culture name in the format "&lt;languagefull&gt; (&lt;country/regionfull&gt;)" in the language of the localized version of .NET Framework.</summary>
/// <returns>The culture name in the format "&lt;languagefull&gt; (&lt;country/regionfull&gt;)" in the language of the localized version of .NET Framework, where &lt;languagefull&gt; is the full name of the language and &lt;country/regionfull&gt; is the full name of the country/region.</returns>
// Token: 0x17000323 RID: 803
// (get) Token: 0x060012AC RID: 4780 RVA: 0x000495F4 File Offset: 0x000477F4
public virtual string DisplayName
{
get
{
if (!this.constructed)
{
this.Construct();
}
return this.displayname;
}
}
/// <summary>Gets the culture name in the format "&lt;languagefull&gt; (&lt;country/regionfull&gt;)" in English.</summary>
/// <returns>The culture name in the format "&lt;languagefull&gt; (&lt;country/regionfull&gt;)" in English, where &lt;languagefull&gt; is the full name of the language and &lt;country/regionfull&gt; is the full name of the country/region.</returns>
// Token: 0x17000324 RID: 804
// (get) Token: 0x060012AD RID: 4781 RVA: 0x00049610 File Offset: 0x00047810
public virtual string EnglishName
{
get
{
if (!this.constructed)
{
this.Construct();
}
return this.englishname;
}
}
/// <summary>Gets the <see cref="T:System.Globalization.CultureInfo" /> that represents the culture installed with the operating system.</summary>
/// <returns>The <see cref="T:System.Globalization.CultureInfo" /> that represents the culture installed with the operating system.</returns>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x17000325 RID: 805
// (get) Token: 0x060012AE RID: 4782 RVA: 0x0004962C File Offset: 0x0004782C
public static CultureInfo InstalledUICulture
{
get
{
return CultureInfo.GetCultureInfo(CultureInfo.BootstrapCultureID);
}
}
/// <summary>Gets a value indicating whether the current <see cref="T:System.Globalization.CultureInfo" /> is read-only.</summary>
/// <returns>true if the current <see cref="T:System.Globalization.CultureInfo" /> is read-only; otherwise, false. The default is false.</returns>
// Token: 0x17000326 RID: 806
// (get) Token: 0x060012AF RID: 4783 RVA: 0x00049638 File Offset: 0x00047838
public bool IsReadOnly
{
get
{
return this.m_isReadOnly;
}
}
/// <summary>Gets an object that defines how to format the specified type.</summary>
/// <returns>The value of the <see cref="P:System.Globalization.CultureInfo.NumberFormat" /> property, which is a <see cref="T:System.Globalization.NumberFormatInfo" /> containing the default number format information for the current <see cref="T:System.Globalization.CultureInfo" />, if <paramref name="formatType" /> is the <see cref="T:System.Type" /> object for the <see cref="T:System.Globalization.NumberFormatInfo" /> class.-or- The value of the <see cref="P:System.Globalization.CultureInfo.DateTimeFormat" /> property, which is a <see cref="T:System.Globalization.DateTimeFormatInfo" /> containing the default date and time format information for the current <see cref="T:System.Globalization.CultureInfo" />, if <paramref name="formatType" /> is the <see cref="T:System.Type" /> object for the <see cref="T:System.Globalization.DateTimeFormatInfo" /> class.-or- null, if <paramref name="formatType" /> is any other object.</returns>
/// <param name="formatType">The <see cref="T:System.Type" /> for which to get a formatting object. This method only supports the <see cref="T:System.Globalization.NumberFormatInfo" /> and <see cref="T:System.Globalization.DateTimeFormatInfo" /> types. </param>
// Token: 0x060012B0 RID: 4784 RVA: 0x00049640 File Offset: 0x00047840
public virtual object GetFormat(Type formatType)
{
object obj = null;
if (formatType == typeof(NumberFormatInfo))
{
obj = this.NumberFormat;
}
else if (formatType == typeof(DateTimeFormatInfo))
{
obj = this.DateTimeFormat;
}
return obj;
}
// Token: 0x060012B1 RID: 4785 RVA: 0x00049684 File Offset: 0x00047884
private void Construct()
{
this.construct_internal_locale_from_lcid(this.cultureID);
this.constructed = true;
}
// Token: 0x060012B2 RID: 4786 RVA: 0x0004969C File Offset: 0x0004789C
private bool ConstructInternalLocaleFromName(string locale)
{
string text = locale;
if (text != null)
{
if (CultureInfo.<>f__switch$map19 == null)
{
CultureInfo.<>f__switch$map19 = new Dictionary<string, int>(2)
{
{ "zh-hans", 0 },
{ "zh-hant", 1 }
};
}
int num;
if (CultureInfo.<>f__switch$map19.TryGetValue(text, out num))
{
if (num != 0)
{
if (num == 1)
{
locale = "zh-cht";
}
}
else
{
locale = "zh-chs";
}
}
}
return this.construct_internal_locale_from_name(locale);
}
// Token: 0x060012B3 RID: 4787 RVA: 0x0004972C File Offset: 0x0004792C
private bool ConstructInternalLocaleFromLcid(int lcid)
{
return this.construct_internal_locale_from_lcid(lcid);
}
// Token: 0x060012B4 RID: 4788 RVA: 0x00049740 File Offset: 0x00047940
private static bool ConstructInternalLocaleFromSpecificName(CultureInfo ci, string name)
{
return CultureInfo.construct_internal_locale_from_specific_name(ci, name);
}
// Token: 0x060012B5 RID: 4789 RVA: 0x00049754 File Offset: 0x00047954
private static bool ConstructInternalLocaleFromCurrentLocale(CultureInfo ci)
{
return CultureInfo.construct_internal_locale_from_current_locale(ci);
}
// Token: 0x060012B6 RID: 4790
[MethodImpl(MethodImplOptions.InternalCall)]
private extern bool construct_internal_locale_from_lcid(int lcid);
// Token: 0x060012B7 RID: 4791
[MethodImpl(MethodImplOptions.InternalCall)]
private extern bool construct_internal_locale_from_name(string name);
// Token: 0x060012B8 RID: 4792
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern bool construct_internal_locale_from_specific_name(CultureInfo ci, string name);
// Token: 0x060012B9 RID: 4793
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern bool construct_internal_locale_from_current_locale(CultureInfo ci);
// Token: 0x060012BA RID: 4794
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern CultureInfo[] internal_get_cultures(bool neutral, bool specific, bool installed);
// Token: 0x060012BB RID: 4795
[MethodImpl(MethodImplOptions.InternalCall)]
private extern void construct_datetime_format();
// Token: 0x060012BC RID: 4796
[MethodImpl(MethodImplOptions.InternalCall)]
private extern void construct_number_format();
// Token: 0x060012BD RID: 4797
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern bool internal_is_lcid_neutral(int lcid, out bool is_neutral);
// Token: 0x060012BE RID: 4798 RVA: 0x00049764 File Offset: 0x00047964
private void ConstructInvariant(bool read_only)
{
this.cultureID = 127;
this.numInfo = NumberFormatInfo.InvariantInfo;
this.dateTimeInfo = DateTimeFormatInfo.InvariantInfo;
if (!read_only)
{
this.numInfo = (NumberFormatInfo)this.numInfo.Clone();
this.dateTimeInfo = (DateTimeFormatInfo)this.dateTimeInfo.Clone();
}
this.textInfo = this.CreateTextInfo(read_only);
this.m_name = string.Empty;
this.displayname = (this.englishname = (this.nativename = "Invariant Language (Invariant Country)"));
this.iso3lang = "IVL";
this.iso2lang = "iv";
this.icu_name = "en_US_POSIX";
this.win3lang = "IVL";
}
// Token: 0x060012BF RID: 4799 RVA: 0x00049830 File Offset: 0x00047A30
private TextInfo CreateTextInfo(bool readOnly)
{
return new TextInfo(this, this.cultureID, this.textinfo_data, readOnly);
}
// Token: 0x060012C0 RID: 4800 RVA: 0x00049848 File Offset: 0x00047A48
private static void insert_into_shared_tables(CultureInfo c)
{
if (CultureInfo.shared_by_number == null)
{
CultureInfo.shared_by_number = new Hashtable();
CultureInfo.shared_by_name = new Hashtable();
}
CultureInfo.shared_by_number[c.cultureID] = c;
CultureInfo.shared_by_name[c.m_name] = c;
}
/// <summary>Retrieves a cached, read-only instance of a culture using the specified culture identifier.</summary>
/// <returns>A read-only <see cref="T:System.Globalization.CultureInfo" /> object.</returns>
/// <param name="culture">A culture identifier.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="culture" /> is less than zero.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="culture" /> specifies a culture that is not supported.</exception>
// Token: 0x060012C1 RID: 4801 RVA: 0x0004989C File Offset: 0x00047A9C
public static CultureInfo GetCultureInfo(int culture)
{
object obj = CultureInfo.shared_table_lock;
CultureInfo cultureInfo2;
lock (obj)
{
CultureInfo cultureInfo;
if (CultureInfo.shared_by_number != null)
{
cultureInfo = CultureInfo.shared_by_number[culture] as CultureInfo;
if (cultureInfo != null)
{
return cultureInfo;
}
}
cultureInfo = new CultureInfo(culture, false, true);
CultureInfo.insert_into_shared_tables(cultureInfo);
cultureInfo2 = cultureInfo;
}
return cultureInfo2;
}
/// <summary>Retrieves a cached, read-only instance of a culture using the specified culture name. </summary>
/// <returns>A read-only <see cref="T:System.Globalization.CultureInfo" /> object.</returns>
/// <param name="name">The name of a culture.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="name" /> specifies a culture that is not supported.</exception>
// Token: 0x060012C2 RID: 4802 RVA: 0x00049924 File Offset: 0x00047B24
public static CultureInfo GetCultureInfo(string name)
{
if (name == null)
{
throw new ArgumentNullException("name");
}
object obj = CultureInfo.shared_table_lock;
CultureInfo cultureInfo2;
lock (obj)
{
CultureInfo cultureInfo;
if (CultureInfo.shared_by_name != null)
{
cultureInfo = CultureInfo.shared_by_name[name] as CultureInfo;
if (cultureInfo != null)
{
return cultureInfo;
}
}
cultureInfo = new CultureInfo(name, false, true);
CultureInfo.insert_into_shared_tables(cultureInfo);
cultureInfo2 = cultureInfo;
}
return cultureInfo2;
}
/// <summary>Retrieves a cached, read-only instance of a culture. Parameters specify a culture that is initialized with the <see cref="T:System.Globalization.TextInfo" /> and <see cref="T:System.Globalization.CompareInfo" /> objects specified by another culture.</summary>
/// <returns>A read-only <see cref="T:System.Globalization.CultureInfo" /> object.</returns>
/// <param name="name">The name of a culture.</param>
/// <param name="altName">The name of a culture that supplies the <see cref="T:System.Globalization.TextInfo" /> and <see cref="T:System.Globalization.CompareInfo" /> objects used to initialize <paramref name="name" />.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> or <paramref name="altName" /> is null.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="name" /> or <paramref name="altName" /> specifies a culture that is not supported.</exception>
// Token: 0x060012C3 RID: 4803 RVA: 0x000499B8 File Offset: 0x00047BB8
[MonoTODO("Currently it ignores the altName parameter")]
public static CultureInfo GetCultureInfo(string name, string altName)
{
if (name == null)
{
throw new ArgumentNullException("null");
}
if (altName == null)
{
throw new ArgumentNullException("null");
}
return CultureInfo.GetCultureInfo(name);
}
/// <summary>Deprecated. Retrieves a read-only <see cref="T:System.Globalization.CultureInfo" /> object having linguistic characteristics that are identified by the specified RFC 4646 language tag. </summary>
/// <returns>A read-only <see cref="T:System.Globalization.CultureInfo" /> object.</returns>
/// <param name="name">The name of a language as specified by the RFC 4646 standard.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="name" /> does not correspond to a supported culture.</exception>
// Token: 0x060012C4 RID: 4804 RVA: 0x000499F0 File Offset: 0x00047BF0
public static CultureInfo GetCultureInfoByIetfLanguageTag(string name)
{
if (name != null)
{
if (CultureInfo.<>f__switch$map1A == null)
{
CultureInfo.<>f__switch$map1A = new Dictionary<string, int>(2)
{
{ "zh-Hans", 0 },
{ "zh-Hant", 1 }
};
}
int num;
if (CultureInfo.<>f__switch$map1A.TryGetValue(name, out num))
{
if (num == 0)
{
return CultureInfo.GetCultureInfo("zh-CHS");
}
if (num == 1)
{
return CultureInfo.GetCultureInfo("zh-CHT");
}
}
}
return CultureInfo.GetCultureInfo(name);
}
// Token: 0x060012C5 RID: 4805 RVA: 0x00049A74 File Offset: 0x00047C74
internal static CultureInfo CreateCulture(string name, bool reference)
{
bool flag = name.Length == 0;
bool flag2;
bool flag3;
if (reference)
{
flag2 = !flag;
flag3 = false;
}
else
{
flag3 = false;
flag2 = !flag;
}
return new CultureInfo(name, flag2, flag3);
}
// Token: 0x060012C6 RID: 4806 RVA: 0x00049AC0 File Offset: 0x00047CC0
internal unsafe void ConstructCalendars()
{
if (this.calendar_data == null)
{
this.optional_calendars = new Calendar[]
{
new GregorianCalendar(GregorianCalendarTypes.Localized)
};
return;
}
this.optional_calendars = new Calendar[5];
for (int i = 0; i < 5; i++)
{
int num = this.calendar_data[i];
Calendar calendar;
switch (num >> 24)
{
case 0:
{
GregorianCalendarTypes gregorianCalendarTypes = (GregorianCalendarTypes)(num & 16777215);
calendar = new GregorianCalendar(gregorianCalendarTypes);
break;
}
case 1:
calendar = new HijriCalendar();
break;
case 2:
calendar = new ThaiBuddhistCalendar();
break;
default:
throw new Exception("invalid calendar type: " + num);
}
this.optional_calendars[i] = calendar;
}
}
// Token: 0x040004D6 RID: 1238
private const int NumOptionalCalendars = 5;
// Token: 0x040004D7 RID: 1239
private const int GregorianTypeMask = 16777215;
// Token: 0x040004D8 RID: 1240
private const int CalendarTypeBits = 24;
// Token: 0x040004D9 RID: 1241
private const int InvariantCultureId = 127;
// Token: 0x040004DA RID: 1242
private static volatile CultureInfo invariant_culture_info = new CultureInfo(127, false, true);
// Token: 0x040004DB RID: 1243
private static object shared_table_lock = new object();
// Token: 0x040004DC RID: 1244
internal static int BootstrapCultureID;
// Token: 0x040004DD RID: 1245
private bool m_isReadOnly;
// Token: 0x040004DE RID: 1246
private int cultureID;
// Token: 0x040004DF RID: 1247
[NonSerialized]
private int parent_lcid;
// Token: 0x040004E0 RID: 1248
[NonSerialized]
private int specific_lcid;
// Token: 0x040004E1 RID: 1249
[NonSerialized]
private int datetime_index;
// Token: 0x040004E2 RID: 1250
[NonSerialized]
private int number_index;
// Token: 0x040004E3 RID: 1251
private bool m_useUserOverride;
// Token: 0x040004E4 RID: 1252
[NonSerialized]
private volatile NumberFormatInfo numInfo;
// Token: 0x040004E5 RID: 1253
private volatile DateTimeFormatInfo dateTimeInfo;
// Token: 0x040004E6 RID: 1254
private volatile TextInfo textInfo;
// Token: 0x040004E7 RID: 1255
private string m_name;
// Token: 0x040004E8 RID: 1256
[NonSerialized]
private string displayname;
// Token: 0x040004E9 RID: 1257
[NonSerialized]
private string englishname;
// Token: 0x040004EA RID: 1258
[NonSerialized]
private string nativename;
// Token: 0x040004EB RID: 1259
[NonSerialized]
private string iso3lang;
// Token: 0x040004EC RID: 1260
[NonSerialized]
private string iso2lang;
// Token: 0x040004ED RID: 1261
[NonSerialized]
private string icu_name;
// Token: 0x040004EE RID: 1262
[NonSerialized]
private string win3lang;
// Token: 0x040004EF RID: 1263
[NonSerialized]
private string territory;
// Token: 0x040004F0 RID: 1264
private volatile CompareInfo compareInfo;
// Token: 0x040004F1 RID: 1265
[NonSerialized]
private unsafe readonly int* calendar_data;
// Token: 0x040004F2 RID: 1266
[NonSerialized]
private unsafe readonly void* textinfo_data;
// Token: 0x040004F3 RID: 1267
[NonSerialized]
private Calendar[] optional_calendars;
// Token: 0x040004F4 RID: 1268
[NonSerialized]
private CultureInfo parent_culture;
// Token: 0x040004F5 RID: 1269
private int m_dataItem;
// Token: 0x040004F6 RID: 1270
private Calendar calendar;
// Token: 0x040004F7 RID: 1271
[NonSerialized]
private bool constructed;
// Token: 0x040004F8 RID: 1272
[NonSerialized]
internal byte[] cached_serialized_form;
// Token: 0x040004F9 RID: 1273
private static readonly string MSG_READONLY = "This instance is read only";
// Token: 0x040004FA RID: 1274
private static Hashtable shared_by_number;
// Token: 0x040004FB RID: 1275
private static Hashtable shared_by_name;
}
}
@@ -0,0 +1,38 @@
using System;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Defines the types of culture lists that can be retrieved using <see cref="M:System.Globalization.CultureInfo.GetCultures(System.Globalization.CultureTypes)" />.</summary>
// Token: 0x0200017F RID: 383
[Flags]
[ComVisible(true)]
[Serializable]
public enum CultureTypes
{
/// <summary>Cultures that are associated with a language but are not specific to a country/region. The names of .NET Framework cultures consist of the lowercase two-letter code derived from ISO 639-1. For example: "en" (English) is a neutral culture. </summary>
// Token: 0x040004FF RID: 1279
NeutralCultures = 1,
/// <summary>Cultures that are specific to a country/region. The names of these cultures follow RFC 4646 (Windows Vista and later). The format is "&lt;languagecode2&gt;-&lt;country/regioncode2&gt;", where &lt;languagecode2&gt; is a lowercase two-letter code derived from ISO 639-1 and &lt;country/regioncode2&gt; is an uppercase two-letter code derived from ISO 3166. For example, "en-US" for English (United States) is a specific culture.</summary>
// Token: 0x04000500 RID: 1280
SpecificCultures = 2,
/// <summary>All cultures that are installed in the Windows operating system. Note that not all cultures supported by the .NET Framework are installed in the operating system.</summary>
// Token: 0x04000501 RID: 1281
InstalledWin32Cultures = 4,
/// <summary>All cultures that ship with the .NET Framework, including neutral and specific cultures, cultures installed in the Windows operating system, and custom cultures created by the user.</summary>
// Token: 0x04000502 RID: 1282
AllCultures = 7,
/// <summary>Custom cultures created by the user.</summary>
// Token: 0x04000503 RID: 1283
UserCustomCulture = 8,
/// <summary>Custom cultures created by the user that replace cultures shipped with the .NET Framework.</summary>
// Token: 0x04000504 RID: 1284
ReplacementCultures = 16,
/// <summary>Cultures installed in the Windows operating system but not the .NET Framework.</summary>
// Token: 0x04000505 RID: 1285
WindowsOnlyCultures = 32,
/// <summary>Neutral and specific cultures shipped with the .NET Framework.</summary>
// Token: 0x04000506 RID: 1286
FrameworkCultures = 64
}
}
@@ -0,0 +1,20 @@
using System;
namespace System.Globalization
{
// Token: 0x02000180 RID: 384
[Flags]
internal enum DateTimeFormatFlags
{
// Token: 0x04000508 RID: 1288
Unused = 0,
// Token: 0x04000509 RID: 1289
But = 1,
// Token: 0x0400050A RID: 1290
Serialized = 2,
// Token: 0x0400050B RID: 1291
By = 3,
// Token: 0x0400050C RID: 1292
Microsoft = 4
}
}
@@ -0,0 +1,1435 @@
using System;
using System.Collections;
using System.Runtime.InteropServices;
using System.Threading;
namespace System.Globalization
{
/// <summary>Defines how <see cref="T:System.DateTime" /> values are formatted and displayed, depending on the culture.</summary>
// Token: 0x02000181 RID: 385
[ComVisible(true)]
[Serializable]
public sealed class DateTimeFormatInfo : ICloneable, IFormatProvider
{
// Token: 0x060012C7 RID: 4807 RVA: 0x00049B88 File Offset: 0x00047D88
internal DateTimeFormatInfo(bool read_only)
{
this.m_isReadOnly = read_only;
this.amDesignator = "AM";
this.pmDesignator = "PM";
this.dateSeparator = "/";
this.timeSeparator = ":";
this.shortDatePattern = "MM/dd/yyyy";
this.longDatePattern = "dddd, dd MMMM yyyy";
this.shortTimePattern = "HH:mm";
this.longTimePattern = "HH:mm:ss";
this.monthDayPattern = "MMMM dd";
this.yearMonthPattern = "yyyy MMMM";
this.fullDateTimePattern = "dddd, dd MMMM yyyy HH:mm:ss";
this._RFC1123Pattern = "ddd, dd MMM yyyy HH':'mm':'ss 'GMT'";
this._SortableDateTimePattern = "yyyy'-'MM'-'dd'T'HH':'mm':'ss";
this._UniversalSortableDateTimePattern = "yyyy'-'MM'-'dd HH':'mm':'ss'Z'";
this.firstDayOfWeek = 0;
this.calendar = new GregorianCalendar();
this.calendarWeekRule = 0;
this.abbreviatedDayNames = DateTimeFormatInfo.INVARIANT_ABBREVIATED_DAY_NAMES;
this.dayNames = DateTimeFormatInfo.INVARIANT_DAY_NAMES;
this.abbreviatedMonthNames = DateTimeFormatInfo.INVARIANT_ABBREVIATED_MONTH_NAMES;
this.monthNames = DateTimeFormatInfo.INVARIANT_MONTH_NAMES;
this.m_genitiveAbbreviatedMonthNames = DateTimeFormatInfo.INVARIANT_ABBREVIATED_MONTH_NAMES;
this.genitiveMonthNames = DateTimeFormatInfo.INVARIANT_MONTH_NAMES;
this.shortDayNames = DateTimeFormatInfo.INVARIANT_SHORT_DAY_NAMES;
}
/// <summary>Initializes a new writable instance of the <see cref="T:System.Globalization.DateTimeFormatInfo" /> class that is culture-independent (invariant).</summary>
// Token: 0x060012C8 RID: 4808 RVA: 0x00049CA4 File Offset: 0x00047EA4
public DateTimeFormatInfo()
: this(false)
{
}
/// <summary>Returns the <see cref="T:System.Globalization.DateTimeFormatInfo" /> associated with the specified <see cref="T:System.IFormatProvider" />.</summary>
/// <returns>A <see cref="T:System.Globalization.DateTimeFormatInfo" /> associated with the specified <see cref="T:System.IFormatProvider" />.</returns>
/// <param name="provider">The <see cref="T:System.IFormatProvider" /> that gets the <see cref="T:System.Globalization.DateTimeFormatInfo" />.-or- null to get <see cref="P:System.Globalization.DateTimeFormatInfo.CurrentInfo" />. </param>
// Token: 0x060012CA RID: 4810 RVA: 0x00049E94 File Offset: 0x00048094
public static DateTimeFormatInfo GetInstance(IFormatProvider provider)
{
if (provider != null)
{
DateTimeFormatInfo dateTimeFormatInfo = (DateTimeFormatInfo)provider.GetFormat(typeof(DateTimeFormatInfo));
if (dateTimeFormatInfo != null)
{
return dateTimeFormatInfo;
}
}
return DateTimeFormatInfo.CurrentInfo;
}
/// <summary>Gets a value indicating whether the <see cref="T:System.Globalization.DateTimeFormatInfo" /> object is read-only.</summary>
/// <returns>true if the <see cref="T:System.Globalization.DateTimeFormatInfo" /> object is read-only; otherwise, false.</returns>
// Token: 0x17000327 RID: 807
// (get) Token: 0x060012CB RID: 4811 RVA: 0x00049ECC File Offset: 0x000480CC
public bool IsReadOnly
{
get
{
return this.m_isReadOnly;
}
}
/// <summary>Returns a read-only <see cref="T:System.Globalization.DateTimeFormatInfo" /> wrapper.</summary>
/// <returns>A read-only <see cref="T:System.Globalization.DateTimeFormatInfo" /> wrapper around <paramref name="dtfi" />.</returns>
/// <param name="dtfi">The <see cref="T:System.Globalization.DateTimeFormatInfo" /> to wrap. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="dtfi" /> is null. </exception>
// Token: 0x060012CC RID: 4812 RVA: 0x00049ED4 File Offset: 0x000480D4
public static DateTimeFormatInfo ReadOnly(DateTimeFormatInfo dtfi)
{
DateTimeFormatInfo dateTimeFormatInfo = (DateTimeFormatInfo)dtfi.Clone();
dateTimeFormatInfo.m_isReadOnly = true;
return dateTimeFormatInfo;
}
/// <summary>Creates a shallow copy of the <see cref="T:System.Globalization.DateTimeFormatInfo" />.</summary>
/// <returns>A new <see cref="T:System.Globalization.DateTimeFormatInfo" /> copied from the original <see cref="T:System.Globalization.DateTimeFormatInfo" />.</returns>
// Token: 0x060012CD RID: 4813 RVA: 0x00049EF8 File Offset: 0x000480F8
public object Clone()
{
DateTimeFormatInfo dateTimeFormatInfo = (DateTimeFormatInfo)base.MemberwiseClone();
dateTimeFormatInfo.m_isReadOnly = false;
return dateTimeFormatInfo;
}
/// <summary>Returns an object of the specified type that provides a <see cref="T:System.DateTime" /> formatting service.</summary>
/// <returns>The current <see cref="T:System.Globalization.DateTimeFormatInfo" />, if <paramref name="formatType" /> is the same as the type of the current <see cref="T:System.Globalization.DateTimeFormatInfo" />; otherwise, null.</returns>
/// <param name="formatType">The <see cref="T:System.Type" /> of the required formatting service. </param>
// Token: 0x060012CE RID: 4814 RVA: 0x00049F1C File Offset: 0x0004811C
public object GetFormat(Type formatType)
{
return (formatType != base.GetType()) ? null : this;
}
/// <summary>Returns the string containing the abbreviated name of the specified era, if an abbreviation exists.</summary>
/// <returns>A string containing the abbreviated name of the specified era, if an abbreviation exists.-or- A string containing the full name of the era, if an abbreviation does not exist.</returns>
/// <param name="era">The integer representing the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="era" /> does not represent a valid era in the calendar specified in the <see cref="P:System.Globalization.DateTimeFormatInfo.Calendar" /> property. </exception>
// Token: 0x060012CF RID: 4815 RVA: 0x00049F34 File Offset: 0x00048134
public string GetAbbreviatedEraName(int era)
{
if (era < 0 || era >= this.calendar.AbbreviatedEraNames.Length)
{
throw new ArgumentOutOfRangeException("era", era.ToString());
}
return this.calendar.AbbreviatedEraNames[era];
}
/// <summary>Returns the culture-specific abbreviated name of the specified month based on the culture associated with the current <see cref="T:System.Globalization.DateTimeFormatInfo" /> object.</summary>
/// <returns>The culture-specific abbreviated name of the month represented by <paramref name="month" />.</returns>
/// <param name="month">An integer from 1 through 13 representing the name of the month to retrieve. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="month" /> is less than 1 or greater than 13. </exception>
// Token: 0x060012D0 RID: 4816 RVA: 0x00049F7C File Offset: 0x0004817C
public string GetAbbreviatedMonthName(int month)
{
if (month < 1 || month > 13)
{
throw new ArgumentOutOfRangeException();
}
return this.abbreviatedMonthNames[month - 1];
}
/// <summary>Returns the integer representing the specified era.</summary>
/// <returns>The integer representing the era, if <paramref name="eraName" /> is valid; otherwise, -1.</returns>
/// <param name="eraName">The string containing the name of the era. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="eraName" /> is null. </exception>
// Token: 0x060012D1 RID: 4817 RVA: 0x00049FA0 File Offset: 0x000481A0
public int GetEra(string eraName)
{
if (eraName == null)
{
throw new ArgumentNullException();
}
string[] array = this.calendar.EraNames;
for (int i = 0; i < array.Length; i++)
{
if (CultureInfo.InvariantCulture.CompareInfo.Compare(eraName, array[i], CompareOptions.IgnoreCase) == 0)
{
return this.calendar.Eras[i];
}
}
array = this.calendar.AbbreviatedEraNames;
for (int j = 0; j < array.Length; j++)
{
if (CultureInfo.InvariantCulture.CompareInfo.Compare(eraName, array[j], CompareOptions.IgnoreCase) == 0)
{
return this.calendar.Eras[j];
}
}
return -1;
}
/// <summary>Returns the string containing the name of the specified era.</summary>
/// <returns>A string containing the name of the era.</returns>
/// <param name="era">The integer representing the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="era" /> does not represent a valid era in the calendar specified in the <see cref="P:System.Globalization.DateTimeFormatInfo.Calendar" /> property. </exception>
// Token: 0x060012D2 RID: 4818 RVA: 0x0004A048 File Offset: 0x00048248
public string GetEraName(int era)
{
if (era < 0 || era > this.calendar.EraNames.Length)
{
throw new ArgumentOutOfRangeException("era", era.ToString());
}
return this.calendar.EraNames[era - 1];
}
/// <summary>Returns the culture-specific full name of the specified month based on the culture associated with the current <see cref="T:System.Globalization.DateTimeFormatInfo" /> object.</summary>
/// <returns>The culture-specific full name of the month represented by <paramref name="month" />.</returns>
/// <param name="month">An integer from 1 through 13 representing the name of the month to retrieve. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="month" /> is less than 1 or greater than 13. </exception>
// Token: 0x060012D3 RID: 4819 RVA: 0x0004A090 File Offset: 0x00048290
public string GetMonthName(int month)
{
if (month < 1 || month > 13)
{
throw new ArgumentOutOfRangeException();
}
return this.monthNames[month - 1];
}
/// <summary>Gets or sets a one-dimensional array of type <see cref="T:System.String" /> containing the culture-specific abbreviated names of the days of the week.</summary>
/// <returns>A one-dimensional array of type <see cref="T:System.String" /> containing the culture-specific abbreviated names of the days of the week. The array for <see cref="P:System.Globalization.DateTimeFormatInfo.InvariantInfo" /> contains "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", and "Sat".</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.ArgumentException">The property is being set to an array that is multidimensional or that has a length that is not exactly 7. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
// Token: 0x17000328 RID: 808
// (get) Token: 0x060012D4 RID: 4820 RVA: 0x0004A0B4 File Offset: 0x000482B4
// (set) Token: 0x060012D5 RID: 4821 RVA: 0x0004A0C8 File Offset: 0x000482C8
public string[] AbbreviatedDayNames
{
get
{
return (string[])this.RawAbbreviatedDayNames.Clone();
}
set
{
this.RawAbbreviatedDayNames = value;
}
}
// Token: 0x17000329 RID: 809
// (get) Token: 0x060012D6 RID: 4822 RVA: 0x0004A0D4 File Offset: 0x000482D4
// (set) Token: 0x060012D7 RID: 4823 RVA: 0x0004A0DC File Offset: 0x000482DC
internal string[] RawAbbreviatedDayNames
{
get
{
return this.abbreviatedDayNames;
}
set
{
if (this.IsReadOnly)
{
throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY);
}
if (value == null)
{
throw new ArgumentNullException();
}
if (value.GetLength(0) != 7)
{
throw new ArgumentException(DateTimeFormatInfo.MSG_ARRAYSIZE_DAY);
}
this.abbreviatedDayNames = (string[])value.Clone();
}
}
/// <summary>Gets or sets a one-dimensional array of type <see cref="T:System.String" /> containing the culture-specific abbreviated names of the months.</summary>
/// <returns>A one-dimensional array of type <see cref="T:System.String" /> containing the culture-specific abbreviated names of the months. In a 12-month calendar, the 13th element of the array is an empty string. The array for <see cref="P:System.Globalization.DateTimeFormatInfo.InvariantInfo" /> contains "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", and "".</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.ArgumentException">The property is being set to an array that is multidimensional or that has a length that is not exactly 13. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
// Token: 0x1700032A RID: 810
// (get) Token: 0x060012D8 RID: 4824 RVA: 0x0004A134 File Offset: 0x00048334
// (set) Token: 0x060012D9 RID: 4825 RVA: 0x0004A148 File Offset: 0x00048348
public string[] AbbreviatedMonthNames
{
get
{
return (string[])this.RawAbbreviatedMonthNames.Clone();
}
set
{
this.RawAbbreviatedMonthNames = value;
}
}
// Token: 0x1700032B RID: 811
// (get) Token: 0x060012DA RID: 4826 RVA: 0x0004A154 File Offset: 0x00048354
// (set) Token: 0x060012DB RID: 4827 RVA: 0x0004A15C File Offset: 0x0004835C
internal string[] RawAbbreviatedMonthNames
{
get
{
return this.abbreviatedMonthNames;
}
set
{
if (this.IsReadOnly)
{
throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY);
}
if (value == null)
{
throw new ArgumentNullException();
}
if (value.GetLength(0) != 13)
{
throw new ArgumentException(DateTimeFormatInfo.MSG_ARRAYSIZE_MONTH);
}
this.abbreviatedMonthNames = (string[])value.Clone();
}
}
/// <summary>Gets or sets a one-dimensional array of type <see cref="T:System.String" /> containing the culture-specific full names of the days of the week.</summary>
/// <returns>A one-dimensional array of type <see cref="T:System.String" /> containing the culture-specific full names of the days of the week. The array for <see cref="P:System.Globalization.DateTimeFormatInfo.InvariantInfo" /> contains "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday".</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.ArgumentException">The property is being set to an array that is multidimensional or that has a length that is not exactly 7. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
// Token: 0x1700032C RID: 812
// (get) Token: 0x060012DC RID: 4828 RVA: 0x0004A1B8 File Offset: 0x000483B8
// (set) Token: 0x060012DD RID: 4829 RVA: 0x0004A1CC File Offset: 0x000483CC
public string[] DayNames
{
get
{
return (string[])this.RawDayNames.Clone();
}
set
{
this.RawDayNames = value;
}
}
// Token: 0x1700032D RID: 813
// (get) Token: 0x060012DE RID: 4830 RVA: 0x0004A1D8 File Offset: 0x000483D8
// (set) Token: 0x060012DF RID: 4831 RVA: 0x0004A1E0 File Offset: 0x000483E0
internal string[] RawDayNames
{
get
{
return this.dayNames;
}
set
{
if (this.IsReadOnly)
{
throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY);
}
if (value == null)
{
throw new ArgumentNullException();
}
if (value.GetLength(0) != 7)
{
throw new ArgumentException(DateTimeFormatInfo.MSG_ARRAYSIZE_DAY);
}
this.dayNames = (string[])value.Clone();
}
}
/// <summary>Gets or sets a one-dimensional array of type <see cref="T:System.String" /> containing the culture-specific full names of the months.</summary>
/// <returns>A one-dimensional array of type <see cref="T:System.String" /> containing the culture-specific full names of the months. In a 12-month calendar, the 13th element of the array is an empty string. The array for <see cref="P:System.Globalization.DateTimeFormatInfo.InvariantInfo" /> contains "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", and "".</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.ArgumentException">The property is being set to an array that is multidimensional or that has a length that is not exactly 13. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
// Token: 0x1700032E RID: 814
// (get) Token: 0x060012E0 RID: 4832 RVA: 0x0004A238 File Offset: 0x00048438
// (set) Token: 0x060012E1 RID: 4833 RVA: 0x0004A24C File Offset: 0x0004844C
public string[] MonthNames
{
get
{
return (string[])this.RawMonthNames.Clone();
}
set
{
this.RawMonthNames = value;
}
}
// Token: 0x1700032F RID: 815
// (get) Token: 0x060012E2 RID: 4834 RVA: 0x0004A258 File Offset: 0x00048458
// (set) Token: 0x060012E3 RID: 4835 RVA: 0x0004A260 File Offset: 0x00048460
internal string[] RawMonthNames
{
get
{
return this.monthNames;
}
set
{
if (this.IsReadOnly)
{
throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY);
}
if (value == null)
{
throw new ArgumentNullException();
}
if (value.GetLength(0) != 13)
{
throw new ArgumentException(DateTimeFormatInfo.MSG_ARRAYSIZE_MONTH);
}
this.monthNames = (string[])value.Clone();
}
}
/// <summary>Gets or sets the string designator for hours that are "ante meridiem" (before noon).</summary>
/// <returns>The string designator for hours that are "ante meridiem" (before noon). The default for <see cref="P:System.Globalization.DateTimeFormatInfo.InvariantInfo" /> is "AM".</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
// Token: 0x17000330 RID: 816
// (get) Token: 0x060012E4 RID: 4836 RVA: 0x0004A2BC File Offset: 0x000484BC
// (set) Token: 0x060012E5 RID: 4837 RVA: 0x0004A2C4 File Offset: 0x000484C4
public string AMDesignator
{
get
{
return this.amDesignator;
}
set
{
if (this.IsReadOnly)
{
throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY);
}
if (value == null)
{
throw new ArgumentNullException();
}
this.amDesignator = value;
}
}
/// <summary>Gets or sets the string designator for hours that are "post meridiem" (after noon).</summary>
/// <returns>The string designator for hours that are "post meridiem" (after noon). The default for <see cref="P:System.Globalization.DateTimeFormatInfo.InvariantInfo" /> is "PM".</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
// Token: 0x17000331 RID: 817
// (get) Token: 0x060012E6 RID: 4838 RVA: 0x0004A2F0 File Offset: 0x000484F0
// (set) Token: 0x060012E7 RID: 4839 RVA: 0x0004A2F8 File Offset: 0x000484F8
public string PMDesignator
{
get
{
return this.pmDesignator;
}
set
{
if (this.IsReadOnly)
{
throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY);
}
if (value == null)
{
throw new ArgumentNullException();
}
this.pmDesignator = value;
}
}
/// <summary>Gets or sets the string that separates the components of a date, that is, the year, month, and day.</summary>
/// <returns>The string that separates the components of a date, that is, the year, month, and day. The default for <see cref="P:System.Globalization.DateTimeFormatInfo.InvariantInfo" /> is "/".</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
// Token: 0x17000332 RID: 818
// (get) Token: 0x060012E8 RID: 4840 RVA: 0x0004A324 File Offset: 0x00048524
// (set) Token: 0x060012E9 RID: 4841 RVA: 0x0004A32C File Offset: 0x0004852C
public string DateSeparator
{
get
{
return this.dateSeparator;
}
set
{
if (this.IsReadOnly)
{
throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY);
}
if (value == null)
{
throw new ArgumentNullException();
}
this.dateSeparator = value;
}
}
/// <summary>Gets or sets the string that separates the components of time, that is, the hour, minutes, and seconds.</summary>
/// <returns>The string that separates the components of time. The default for <see cref="P:System.Globalization.DateTimeFormatInfo.InvariantInfo" /> is ":".</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
// Token: 0x17000333 RID: 819
// (get) Token: 0x060012EA RID: 4842 RVA: 0x0004A358 File Offset: 0x00048558
// (set) Token: 0x060012EB RID: 4843 RVA: 0x0004A360 File Offset: 0x00048560
public string TimeSeparator
{
get
{
return this.timeSeparator;
}
set
{
if (this.IsReadOnly)
{
throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY);
}
if (value == null)
{
throw new ArgumentNullException();
}
this.timeSeparator = value;
}
}
/// <summary>Gets or sets the format pattern for a long date value, which is associated with the "D" format pattern.</summary>
/// <returns>The format pattern for a long date value, which is associated with the "D" format pattern.</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
// Token: 0x17000334 RID: 820
// (get) Token: 0x060012EC RID: 4844 RVA: 0x0004A38C File Offset: 0x0004858C
// (set) Token: 0x060012ED RID: 4845 RVA: 0x0004A394 File Offset: 0x00048594
public string LongDatePattern
{
get
{
return this.longDatePattern;
}
set
{
if (this.IsReadOnly)
{
throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY);
}
if (value == null)
{
throw new ArgumentNullException();
}
this.longDatePattern = value;
}
}
/// <summary>Gets or sets the format pattern for a short date value, which is associated with the "d" format pattern.</summary>
/// <returns>The format pattern for a short date value, which is associated with the "d" format pattern.</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> object is read-only. </exception>
// Token: 0x17000335 RID: 821
// (get) Token: 0x060012EE RID: 4846 RVA: 0x0004A3C0 File Offset: 0x000485C0
// (set) Token: 0x060012EF RID: 4847 RVA: 0x0004A3C8 File Offset: 0x000485C8
public string ShortDatePattern
{
get
{
return this.shortDatePattern;
}
set
{
if (this.IsReadOnly)
{
throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY);
}
if (value == null)
{
throw new ArgumentNullException();
}
this.shortDatePattern = value;
}
}
/// <summary>Gets or sets the format pattern for a short time value, which is associated with the "t" format pattern.</summary>
/// <returns>The format pattern for a short time value, which is associated with the "t" format pattern.</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
// Token: 0x17000336 RID: 822
// (get) Token: 0x060012F0 RID: 4848 RVA: 0x0004A3F4 File Offset: 0x000485F4
// (set) Token: 0x060012F1 RID: 4849 RVA: 0x0004A3FC File Offset: 0x000485FC
public string ShortTimePattern
{
get
{
return this.shortTimePattern;
}
set
{
if (this.IsReadOnly)
{
throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY);
}
if (value == null)
{
throw new ArgumentNullException();
}
this.shortTimePattern = value;
}
}
/// <summary>Gets or sets the format pattern for a long time value, which is associated with the "T" format pattern.</summary>
/// <returns>The format pattern for a long time value, which is associated with the "T" format pattern.</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
// Token: 0x17000337 RID: 823
// (get) Token: 0x060012F2 RID: 4850 RVA: 0x0004A428 File Offset: 0x00048628
// (set) Token: 0x060012F3 RID: 4851 RVA: 0x0004A430 File Offset: 0x00048630
public string LongTimePattern
{
get
{
return this.longTimePattern;
}
set
{
if (this.IsReadOnly)
{
throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY);
}
if (value == null)
{
throw new ArgumentNullException();
}
this.longTimePattern = value;
}
}
/// <summary>Gets or sets the format pattern for a month and day value, which is associated with the "m" and "M" format patterns.</summary>
/// <returns>The format pattern for a month and day value, which is associated with the "m" and "M" format patterns.</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
// Token: 0x17000338 RID: 824
// (get) Token: 0x060012F4 RID: 4852 RVA: 0x0004A45C File Offset: 0x0004865C
// (set) Token: 0x060012F5 RID: 4853 RVA: 0x0004A464 File Offset: 0x00048664
public string MonthDayPattern
{
get
{
return this.monthDayPattern;
}
set
{
if (this.IsReadOnly)
{
throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY);
}
if (value == null)
{
throw new ArgumentNullException();
}
this.monthDayPattern = value;
}
}
/// <summary>Gets or sets the format pattern for a year and month value, which is associated with the "y" and "Y" format patterns.</summary>
/// <returns>The format pattern for a year and month value, which is associated with the "y" and "Y" format patterns.</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
// Token: 0x17000339 RID: 825
// (get) Token: 0x060012F6 RID: 4854 RVA: 0x0004A490 File Offset: 0x00048690
// (set) Token: 0x060012F7 RID: 4855 RVA: 0x0004A498 File Offset: 0x00048698
public string YearMonthPattern
{
get
{
return this.yearMonthPattern;
}
set
{
if (this.IsReadOnly)
{
throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY);
}
if (value == null)
{
throw new ArgumentNullException();
}
this.yearMonthPattern = value;
}
}
/// <summary>Gets or sets the format pattern for a long date and long time value, which is associated with the "F" format pattern.</summary>
/// <returns>The format pattern for a long date and long time value, which is associated with the "F" format pattern.</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
// Token: 0x1700033A RID: 826
// (get) Token: 0x060012F8 RID: 4856 RVA: 0x0004A4C4 File Offset: 0x000486C4
// (set) Token: 0x060012F9 RID: 4857 RVA: 0x0004A4FC File Offset: 0x000486FC
public string FullDateTimePattern
{
get
{
if (this.fullDateTimePattern != null)
{
return this.fullDateTimePattern;
}
return this.longDatePattern + " " + this.longTimePattern;
}
set
{
if (this.IsReadOnly)
{
throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY);
}
if (value == null)
{
throw new ArgumentNullException();
}
this.fullDateTimePattern = value;
}
}
/// <summary>Gets a read-only <see cref="T:System.Globalization.DateTimeFormatInfo" /> object that formats values based on the current culture.</summary>
/// <returns>A read-only <see cref="T:System.Globalization.DateTimeFormatInfo" /> object based on the <see cref="T:System.Globalization.CultureInfo" /> object for the current thread.</returns>
// Token: 0x1700033B RID: 827
// (get) Token: 0x060012FA RID: 4858 RVA: 0x0004A528 File Offset: 0x00048728
public static DateTimeFormatInfo CurrentInfo
{
get
{
return Thread.CurrentThread.CurrentCulture.DateTimeFormat;
}
}
/// <summary>Gets the default read-only <see cref="T:System.Globalization.DateTimeFormatInfo" /> that is culture-independent (invariant).</summary>
/// <returns>The default read-only <see cref="T:System.Globalization.DateTimeFormatInfo" /> object that is culture-independent (invariant).</returns>
// Token: 0x1700033C RID: 828
// (get) Token: 0x060012FB RID: 4859 RVA: 0x0004A53C File Offset: 0x0004873C
public static DateTimeFormatInfo InvariantInfo
{
get
{
if (DateTimeFormatInfo.theInvariantDateTimeFormatInfo == null)
{
DateTimeFormatInfo.theInvariantDateTimeFormatInfo = DateTimeFormatInfo.ReadOnly(new DateTimeFormatInfo());
DateTimeFormatInfo.theInvariantDateTimeFormatInfo.FillInvariantPatterns();
}
return DateTimeFormatInfo.theInvariantDateTimeFormatInfo;
}
}
/// <summary>Gets or sets the first day of the week.</summary>
/// <returns>A <see cref="T:System.DayOfWeek" /> value representing the first day of the week. The default for <see cref="P:System.Globalization.DateTimeFormatInfo.InvariantInfo" /> is <see cref="F:System.DayOfWeek.Sunday" />.</returns>
/// <exception cref="T:System.ArgumentOutOfRangeException">The property is being set to a value that is not a valid <see cref="T:System.DayOfWeek" /> value. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
// Token: 0x1700033D RID: 829
// (get) Token: 0x060012FC RID: 4860 RVA: 0x0004A574 File Offset: 0x00048774
// (set) Token: 0x060012FD RID: 4861 RVA: 0x0004A57C File Offset: 0x0004877C
public DayOfWeek FirstDayOfWeek
{
get
{
return (DayOfWeek)this.firstDayOfWeek;
}
set
{
if (this.IsReadOnly)
{
throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY);
}
if (value < DayOfWeek.Sunday || value > DayOfWeek.Saturday)
{
throw new ArgumentOutOfRangeException();
}
this.firstDayOfWeek = (int)value;
}
}
/// <summary>Gets or sets the calendar to use for the current culture.</summary>
/// <returns>The <see cref="T:System.Globalization.Calendar" /> indicating the calendar to use for the current culture. The default for <see cref="P:System.Globalization.DateTimeFormatInfo.InvariantInfo" /> is the <see cref="T:System.Globalization.GregorianCalendar" />.</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.ArgumentException">The property is being set to a <see cref="T:System.Globalization.Calendar" /> that is not valid for the current culture. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
// Token: 0x1700033E RID: 830
// (get) Token: 0x060012FE RID: 4862 RVA: 0x0004A5B0 File Offset: 0x000487B0
// (set) Token: 0x060012FF RID: 4863 RVA: 0x0004A5B8 File Offset: 0x000487B8
public Calendar Calendar
{
get
{
return this.calendar;
}
set
{
if (this.IsReadOnly)
{
throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY);
}
if (value == null)
{
throw new ArgumentNullException();
}
this.calendar = value;
}
}
/// <summary>Gets or sets a value that specifies which rule is used to determine the first calendar week of the year.</summary>
/// <returns>A <see cref="T:System.Globalization.CalendarWeekRule" /> value that determines the first calendar week of the year. The default for <see cref="P:System.Globalization.DateTimeFormatInfo.InvariantInfo" /> is <see cref="F:System.Globalization.CalendarWeekRule.FirstDay" />.</returns>
/// <exception cref="T:System.ArgumentOutOfRangeException">The property is being set to a value that is not a valid <see cref="T:System.Globalization.CalendarWeekRule" /> value. </exception>
// Token: 0x1700033F RID: 831
// (get) Token: 0x06001300 RID: 4864 RVA: 0x0004A5E4 File Offset: 0x000487E4
// (set) Token: 0x06001301 RID: 4865 RVA: 0x0004A5EC File Offset: 0x000487EC
public CalendarWeekRule CalendarWeekRule
{
get
{
return (CalendarWeekRule)this.calendarWeekRule;
}
set
{
if (this.IsReadOnly)
{
throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY);
}
this.calendarWeekRule = (int)value;
}
}
/// <summary>Gets the format pattern for a time value, which is based on the Internet Engineering Task Force (IETF) Request for Comments (RFC) 1123 specification and is associated with the "r" and "R" format patterns.</summary>
/// <returns>The format pattern for a time value, which is based on the IETF RFC 1123 specification and is associated with the "r" and "R" format patterns.</returns>
// Token: 0x17000340 RID: 832
// (get) Token: 0x06001302 RID: 4866 RVA: 0x0004A60C File Offset: 0x0004880C
public string RFC1123Pattern
{
get
{
return this._RFC1123Pattern;
}
}
// Token: 0x17000341 RID: 833
// (get) Token: 0x06001303 RID: 4867 RVA: 0x0004A614 File Offset: 0x00048814
internal string RoundtripPattern
{
get
{
return "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK";
}
}
/// <summary>Gets the format pattern for a sortable date and time value, which is associated with the "s" format pattern.</summary>
/// <returns>The format pattern for a sortable date and time value, which is associated with the "s" format pattern.</returns>
// Token: 0x17000342 RID: 834
// (get) Token: 0x06001304 RID: 4868 RVA: 0x0004A61C File Offset: 0x0004881C
public string SortableDateTimePattern
{
get
{
return this._SortableDateTimePattern;
}
}
/// <summary>Gets the format pattern for a universal sortable date and time value, which is associated with the "u" format pattern.</summary>
/// <returns>The format pattern for a universal sortable date and time value, which is associated with the "u" format pattern.</returns>
// Token: 0x17000343 RID: 835
// (get) Token: 0x06001305 RID: 4869 RVA: 0x0004A624 File Offset: 0x00048824
public string UniversalSortableDateTimePattern
{
get
{
return this._UniversalSortableDateTimePattern;
}
}
/// <summary>Returns all the standard patterns in which date and time values can be formatted.</summary>
/// <returns>An array containing the standard patterns in which date and time values can be formatted.</returns>
// Token: 0x06001306 RID: 4870 RVA: 0x0004A62C File Offset: 0x0004882C
public string[] GetAllDateTimePatterns()
{
return (string[])this.GetAllDateTimePatternsInternal().Clone();
}
// Token: 0x06001307 RID: 4871 RVA: 0x0004A640 File Offset: 0x00048840
internal string[] GetAllDateTimePatternsInternal()
{
this.FillAllDateTimePatterns();
return this.all_date_time_patterns;
}
// Token: 0x06001308 RID: 4872 RVA: 0x0004A650 File Offset: 0x00048850
private void FillAllDateTimePatterns()
{
if (this.all_date_time_patterns != null)
{
return;
}
ArrayList arrayList = new ArrayList();
arrayList.AddRange(this.GetAllRawDateTimePatterns('d'));
arrayList.AddRange(this.GetAllRawDateTimePatterns('D'));
arrayList.AddRange(this.GetAllRawDateTimePatterns('g'));
arrayList.AddRange(this.GetAllRawDateTimePatterns('G'));
arrayList.AddRange(this.GetAllRawDateTimePatterns('f'));
arrayList.AddRange(this.GetAllRawDateTimePatterns('F'));
arrayList.AddRange(this.GetAllRawDateTimePatterns('m'));
arrayList.AddRange(this.GetAllRawDateTimePatterns('M'));
arrayList.AddRange(this.GetAllRawDateTimePatterns('r'));
arrayList.AddRange(this.GetAllRawDateTimePatterns('R'));
arrayList.AddRange(this.GetAllRawDateTimePatterns('s'));
arrayList.AddRange(this.GetAllRawDateTimePatterns('t'));
arrayList.AddRange(this.GetAllRawDateTimePatterns('T'));
arrayList.AddRange(this.GetAllRawDateTimePatterns('u'));
arrayList.AddRange(this.GetAllRawDateTimePatterns('U'));
arrayList.AddRange(this.GetAllRawDateTimePatterns('y'));
arrayList.AddRange(this.GetAllRawDateTimePatterns('Y'));
this.all_date_time_patterns = (string[])arrayList.ToArray(typeof(string));
}
/// <summary>Returns all the standard patterns in which date and time values can be formatted using the specified format pattern.</summary>
/// <returns>An array containing the standard patterns in which date and time values can be formatted using the specified format pattern.</returns>
/// <param name="format">A standard format pattern. </param>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="format" /> is not a valid standard format pattern. </exception>
// Token: 0x06001309 RID: 4873 RVA: 0x0004A77C File Offset: 0x0004897C
public string[] GetAllDateTimePatterns(char format)
{
return (string[])this.GetAllRawDateTimePatterns(format).Clone();
}
// Token: 0x0600130A RID: 4874 RVA: 0x0004A790 File Offset: 0x00048990
internal string[] GetAllRawDateTimePatterns(char format)
{
string[] array;
switch (format)
{
case 'R':
goto IL_2CB;
default:
switch (format)
{
case 'r':
goto IL_2CB;
case 's':
return new string[] { this.SortableDateTimePattern };
case 't':
if (this.allShortTimePatterns != null && this.allShortTimePatterns.Length > 0)
{
return this.allShortTimePatterns;
}
return new string[] { this.ShortTimePattern };
case 'u':
return new string[] { this.UniversalSortableDateTimePattern };
default:
switch (format)
{
case 'D':
if (this.allLongDatePatterns != null && this.allLongDatePatterns.Length > 0)
{
return this.allLongDatePatterns;
}
return new string[] { this.LongDatePattern };
default:
switch (format)
{
case 'd':
if (this.allShortDatePatterns != null && this.allShortDatePatterns.Length > 0)
{
return this.allShortDatePatterns;
}
return new string[] { this.ShortDatePattern };
default:
if (format != 'M' && format != 'm')
{
throw new ArgumentException("Format specifier was invalid.");
}
if (this.monthDayPatterns != null && this.monthDayPatterns.Length > 0)
{
return this.monthDayPatterns;
}
return new string[] { this.MonthDayPattern };
case 'f':
array = this.PopulateCombinedList(this.allLongDatePatterns, this.allShortTimePatterns);
if (array != null && array.Length > 0)
{
return array;
}
return new string[] { this.LongDatePattern + " " + this.ShortTimePattern };
case 'g':
array = this.PopulateCombinedList(this.allShortDatePatterns, this.allShortTimePatterns);
if (array != null && array.Length > 0)
{
return array;
}
return new string[] { this.ShortDatePattern + " " + this.ShortTimePattern };
}
break;
case 'F':
break;
case 'G':
array = this.PopulateCombinedList(this.allShortDatePatterns, this.allLongTimePatterns);
if (array != null && array.Length > 0)
{
return array;
}
return new string[] { this.ShortDatePattern + " " + this.LongTimePattern };
}
break;
case 'y':
goto IL_29B;
}
break;
case 'T':
if (this.allLongTimePatterns != null && this.allLongTimePatterns.Length > 0)
{
return this.allLongTimePatterns;
}
return new string[] { this.LongTimePattern };
case 'U':
break;
case 'Y':
goto IL_29B;
}
array = this.PopulateCombinedList(this.allLongDatePatterns, this.allLongTimePatterns);
if (array != null && array.Length > 0)
{
return array;
}
return new string[] { this.LongDatePattern + " " + this.LongTimePattern };
IL_29B:
if (this.yearMonthPatterns != null && this.yearMonthPatterns.Length > 0)
{
return this.yearMonthPatterns;
}
return new string[] { this.YearMonthPattern };
IL_2CB:
return new string[] { this.RFC1123Pattern };
}
/// <summary>Returns the culture-specific full name of the specified day of the week based on the culture associated with the current <see cref="T:System.Globalization.DateTimeFormatInfo" /> object.</summary>
/// <returns>The culture-specific full name of the day of the week represented by <paramref name="dayofweek" />.</returns>
/// <param name="dayofweek">A <see cref="T:System.DayOfWeek" /> value. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="dayofweek" /> is not a valid <see cref="T:System.DayOfWeek" /> value. </exception>
// Token: 0x0600130B RID: 4875 RVA: 0x0004AAA4 File Offset: 0x00048CA4
public string GetDayName(DayOfWeek dayofweek)
{
if (dayofweek < DayOfWeek.Sunday || dayofweek > DayOfWeek.Saturday)
{
throw new ArgumentOutOfRangeException();
}
return this.dayNames[(int)dayofweek];
}
/// <summary>Returns the culture-specific abbreviated name of the specified day of the week based on the culture associated with the current <see cref="T:System.Globalization.DateTimeFormatInfo" /> object.</summary>
/// <returns>The culture-specific abbreviated name of the day of the week represented by <paramref name="dayofweek" />.</returns>
/// <param name="dayofweek">A <see cref="T:System.DayOfWeek" /> value. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="dayofweek" /> is not a valid <see cref="T:System.DayOfWeek" /> value. </exception>
// Token: 0x0600130C RID: 4876 RVA: 0x0004AAD0 File Offset: 0x00048CD0
public string GetAbbreviatedDayName(DayOfWeek dayofweek)
{
if (dayofweek < DayOfWeek.Sunday || dayofweek > DayOfWeek.Saturday)
{
throw new ArgumentOutOfRangeException();
}
return this.abbreviatedDayNames[(int)dayofweek];
}
// Token: 0x0600130D RID: 4877 RVA: 0x0004AAFC File Offset: 0x00048CFC
private void FillInvariantPatterns()
{
this.allShortDatePatterns = new string[] { "MM/dd/yyyy" };
this.allLongDatePatterns = new string[] { "dddd, dd MMMM yyyy" };
this.allLongTimePatterns = new string[] { "HH:mm:ss" };
this.allShortTimePatterns = new string[] { "HH:mm", "hh:mm tt", "H:mm", "h:mm tt" };
this.monthDayPatterns = new string[] { "MMMM dd" };
this.yearMonthPatterns = new string[] { "yyyy MMMM" };
}
// Token: 0x0600130E RID: 4878 RVA: 0x0004AB9C File Offset: 0x00048D9C
private string[] PopulateCombinedList(string[] dates, string[] times)
{
if (dates != null && times != null)
{
string[] array = new string[dates.Length * times.Length];
int num = 0;
foreach (string text in dates)
{
foreach (string text2 in times)
{
array[num++] = text + " " + text2;
}
}
return array;
}
return null;
}
/// <summary>Gets or sets a string array of abbreviated month names associated with the current <see cref="T:System.Globalization.DateTimeFormatInfo" /> object.</summary>
/// <returns>A string array of abbreviated month names.</returns>
/// <exception cref="T:System.ArgumentNullException">In a set operation, the value array or one of the elements of the value array is null.</exception>
// Token: 0x17000344 RID: 836
// (get) Token: 0x0600130F RID: 4879 RVA: 0x0004AC20 File Offset: 0x00048E20
// (set) Token: 0x06001310 RID: 4880 RVA: 0x0004AC28 File Offset: 0x00048E28
[ComVisible(false)]
[MonoTODO("Returns only the English month abbreviated names")]
public string[] AbbreviatedMonthGenitiveNames
{
get
{
return this.m_genitiveAbbreviatedMonthNames;
}
set
{
this.m_genitiveAbbreviatedMonthNames = value;
}
}
/// <summary>Gets or sets a string array of month names associated with the current <see cref="T:System.Globalization.DateTimeFormatInfo" /> object.</summary>
/// <returns>A string array of month names.</returns>
/// <exception cref="T:System.ArgumentNullException">In a set operation, the value array or one of the elements of the value array is null.</exception>
// Token: 0x17000345 RID: 837
// (get) Token: 0x06001311 RID: 4881 RVA: 0x0004AC34 File Offset: 0x00048E34
// (set) Token: 0x06001312 RID: 4882 RVA: 0x0004AC3C File Offset: 0x00048E3C
[ComVisible(false)]
[MonoTODO("Returns only the English moth names")]
public string[] MonthGenitiveNames
{
get
{
return this.genitiveMonthNames;
}
set
{
this.genitiveMonthNames = value;
}
}
/// <summary>Gets the native name of the calendar associated with the current <see cref="T:System.Globalization.DateTimeFormatInfo" /> object.</summary>
/// <returns>The native name of the calendar used in the culture associated with the current <see cref="T:System.Globalization.DateTimeFormatInfo" /> object if that name is available, or the empty string ("") if the native calendar name is not available.</returns>
// Token: 0x17000346 RID: 838
// (get) Token: 0x06001313 RID: 4883 RVA: 0x0004AC48 File Offset: 0x00048E48
[MonoTODO("Returns an empty string as if the calendar name wasn't available")]
[ComVisible(false)]
public string NativeCalendarName
{
get
{
return string.Empty;
}
}
/// <summary>Gets or sets a string array of the shortest unique abbreviated day names associated with the current <see cref="T:System.Globalization.DateTimeFormatInfo" /> object.</summary>
/// <returns>A string array of day names.</returns>
/// <exception cref="T:System.ArgumentNullException">In a set operation, the value array or one of the elements of the value array is null.</exception>
// Token: 0x17000347 RID: 839
// (get) Token: 0x06001314 RID: 4884 RVA: 0x0004AC50 File Offset: 0x00048E50
// (set) Token: 0x06001315 RID: 4885 RVA: 0x0004AC58 File Offset: 0x00048E58
[ComVisible(false)]
public string[] ShortestDayNames
{
get
{
return this.shortDayNames;
}
set
{
if (value == null)
{
throw new ArgumentNullException();
}
if (value.Length != 7)
{
throw new ArgumentException("Array must have 7 entries");
}
for (int i = 0; i < 7; i++)
{
if (value[i] == null)
{
throw new ArgumentNullException(string.Format("Element {0} is null", i));
}
}
this.shortDayNames = value;
}
}
/// <summary>Obtains the shortest abbreviated day name for a specified day of the week associated with the current <see cref="T:System.Globalization.DateTimeFormatInfo" /> object.</summary>
/// <returns>The abbreviated name of the week that corresponds to the <paramref name="dayOfWeek" /> parameter.</returns>
/// <param name="dayOfWeek">One of the <see cref="T:System.DayOfWeek" /> values.</param>
// Token: 0x06001316 RID: 4886 RVA: 0x0004ACBC File Offset: 0x00048EBC
[ComVisible(false)]
public string GetShortestDayName(DayOfWeek dayOfWeek)
{
if (dayOfWeek < DayOfWeek.Sunday || dayOfWeek > DayOfWeek.Saturday)
{
throw new ArgumentOutOfRangeException();
}
return this.shortDayNames[(int)dayOfWeek];
}
/// <summary>Sets all the custom date and time format strings that correspond to a specified standard format string.</summary>
/// <param name="patterns">An array of custom format strings.</param>
/// <param name="format">The standard format string associated with the custom format strings specified in the <paramref name="patterns" /> parameter. </param>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="patterns" /> is a zero-length array.-or-<paramref name="format" /> is not a valid standard format string or is a standard format string whose patterns cannot be set.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="patterns" /> is null.-or-<paramref name="patterns" /> has an array element whose value is null.</exception>
/// <exception cref="T:System.InvalidOperationException">This <see cref="T:System.Globalization.DateTimeFormatInfo" /> object is read-only.</exception>
// Token: 0x06001317 RID: 4887 RVA: 0x0004ACE8 File Offset: 0x00048EE8
[ComVisible(false)]
public void SetAllDateTimePatterns(string[] patterns, char format)
{
if (patterns == null)
{
throw new ArgumentNullException("patterns");
}
if (patterns.Length == 0)
{
throw new ArgumentException("patterns", "The argument patterns must not be of zero-length");
}
if (format != 'D')
{
if (format != 'M')
{
if (format != 'T')
{
if (format != 'Y')
{
if (format == 'd')
{
this.allShortDatePatterns = patterns;
return;
}
if (format == 'm')
{
goto IL_7C;
}
if (format == 't')
{
this.allShortTimePatterns = patterns;
return;
}
if (format != 'y')
{
throw new ArgumentException("format", "Format specifier is invalid");
}
}
this.yearMonthPatterns = patterns;
return;
}
this.allLongTimePatterns = patterns;
return;
}
IL_7C:
this.monthDayPatterns = patterns;
}
else
{
this.allLongDatePatterns = patterns;
}
}
// Token: 0x0400050D RID: 1293
private const string _RoundtripPattern = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK";
// Token: 0x0400050E RID: 1294
private static readonly string MSG_READONLY = "This instance is read only";
// Token: 0x0400050F RID: 1295
private static readonly string MSG_ARRAYSIZE_MONTH = "An array with exactly 13 elements is needed";
// Token: 0x04000510 RID: 1296
private static readonly string MSG_ARRAYSIZE_DAY = "An array with exactly 7 elements is needed";
// Token: 0x04000511 RID: 1297
private static readonly string[] INVARIANT_ABBREVIATED_DAY_NAMES = new string[] { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
// Token: 0x04000512 RID: 1298
private static readonly string[] INVARIANT_DAY_NAMES = new string[] { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" };
// Token: 0x04000513 RID: 1299
private static readonly string[] INVARIANT_ABBREVIATED_MONTH_NAMES = new string[]
{
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
string.Empty
};
// Token: 0x04000514 RID: 1300
private static readonly string[] INVARIANT_MONTH_NAMES = new string[]
{
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
string.Empty
};
// Token: 0x04000515 RID: 1301
private static readonly string[] INVARIANT_SHORT_DAY_NAMES = new string[] { "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" };
// Token: 0x04000516 RID: 1302
private static DateTimeFormatInfo theInvariantDateTimeFormatInfo;
// Token: 0x04000517 RID: 1303
private bool m_isReadOnly;
// Token: 0x04000518 RID: 1304
private string amDesignator;
// Token: 0x04000519 RID: 1305
private string pmDesignator;
// Token: 0x0400051A RID: 1306
private string dateSeparator;
// Token: 0x0400051B RID: 1307
private string timeSeparator;
// Token: 0x0400051C RID: 1308
private string shortDatePattern;
// Token: 0x0400051D RID: 1309
private string longDatePattern;
// Token: 0x0400051E RID: 1310
private string shortTimePattern;
// Token: 0x0400051F RID: 1311
private string longTimePattern;
// Token: 0x04000520 RID: 1312
private string monthDayPattern;
// Token: 0x04000521 RID: 1313
private string yearMonthPattern;
// Token: 0x04000522 RID: 1314
private string fullDateTimePattern;
// Token: 0x04000523 RID: 1315
private string _RFC1123Pattern;
// Token: 0x04000524 RID: 1316
private string _SortableDateTimePattern;
// Token: 0x04000525 RID: 1317
private string _UniversalSortableDateTimePattern;
// Token: 0x04000526 RID: 1318
private int firstDayOfWeek;
// Token: 0x04000527 RID: 1319
private Calendar calendar;
// Token: 0x04000528 RID: 1320
private int calendarWeekRule;
// Token: 0x04000529 RID: 1321
private string[] abbreviatedDayNames;
// Token: 0x0400052A RID: 1322
private string[] dayNames;
// Token: 0x0400052B RID: 1323
private string[] monthNames;
// Token: 0x0400052C RID: 1324
private string[] abbreviatedMonthNames;
// Token: 0x0400052D RID: 1325
private string[] allShortDatePatterns;
// Token: 0x0400052E RID: 1326
private string[] allLongDatePatterns;
// Token: 0x0400052F RID: 1327
private string[] allShortTimePatterns;
// Token: 0x04000530 RID: 1328
private string[] allLongTimePatterns;
// Token: 0x04000531 RID: 1329
private string[] monthDayPatterns;
// Token: 0x04000532 RID: 1330
private string[] yearMonthPatterns;
// Token: 0x04000533 RID: 1331
private string[] shortDayNames;
// Token: 0x04000534 RID: 1332
private int nDataItem;
// Token: 0x04000535 RID: 1333
private bool m_useUserOverride;
// Token: 0x04000536 RID: 1334
private bool m_isDefaultCalendar;
// Token: 0x04000537 RID: 1335
private int CultureID;
// Token: 0x04000538 RID: 1336
private bool bUseCalendarInfo;
// Token: 0x04000539 RID: 1337
private string generalShortTimePattern;
// Token: 0x0400053A RID: 1338
private string generalLongTimePattern;
// Token: 0x0400053B RID: 1339
private string[] m_eraNames;
// Token: 0x0400053C RID: 1340
private string[] m_abbrevEraNames;
// Token: 0x0400053D RID: 1341
private string[] m_abbrevEnglishEraNames;
// Token: 0x0400053E RID: 1342
private string[] m_dateWords;
// Token: 0x0400053F RID: 1343
private int[] optionalCalendars;
// Token: 0x04000540 RID: 1344
private string[] m_superShortDayNames;
// Token: 0x04000541 RID: 1345
private string[] genitiveMonthNames;
// Token: 0x04000542 RID: 1346
private string[] m_genitiveAbbreviatedMonthNames;
// Token: 0x04000543 RID: 1347
private string[] leapYearMonthNames;
// Token: 0x04000544 RID: 1348
private DateTimeFormatFlags formatFlags;
// Token: 0x04000545 RID: 1349
private string m_name;
// Token: 0x04000546 RID: 1350
private volatile string[] all_date_time_patterns;
}
}
@@ -0,0 +1,44 @@
using System;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Defines the formatting options that customize string parsing for the <see cref="M:System.DateTime.Parse(System.String)" /> and <see cref="M:System.DateTime.TryParse(System.String,System.DateTime@)" /> methods.</summary>
// Token: 0x02000182 RID: 386
[ComVisible(true)]
[Flags]
[Serializable]
public enum DateTimeStyles
{
/// <summary>Default formatting options must be used. This value represents the default style for <see cref="M:System.DateTime.Parse(System.String)" />, <see cref="M:System.DateTime.ParseExact(System.String,System.String,System.IFormatProvider)" />, and <see cref="M:System.DateTime.TryParse(System.String,System.DateTime@)" />.</summary>
// Token: 0x04000548 RID: 1352
None = 0,
/// <summary>Leading white-space characters must be ignored during parsing, except if they occur in the <see cref="T:System.Globalization.DateTimeFormatInfo" /> format patterns.</summary>
// Token: 0x04000549 RID: 1353
AllowLeadingWhite = 1,
/// <summary>Trailing white-space characters must be ignored during parsing, except if they occur in the <see cref="T:System.Globalization.DateTimeFormatInfo" /> format patterns.</summary>
// Token: 0x0400054A RID: 1354
AllowTrailingWhite = 2,
/// <summary>Extra white-space characters in the middle of the string must be ignored during parsing, except if they occur in the <see cref="T:System.Globalization.DateTimeFormatInfo" /> format patterns.</summary>
// Token: 0x0400054B RID: 1355
AllowInnerWhite = 4,
/// <summary>Extra white-space characters anywhere in the string must be ignored during parsing, except if they occur in the <see cref="T:System.Globalization.DateTimeFormatInfo" /> format patterns. This value is a combination of the <see cref="F:System.Globalization.DateTimeStyles.AllowLeadingWhite" />, <see cref="F:System.Globalization.DateTimeStyles.AllowTrailingWhite" />, and <see cref="F:System.Globalization.DateTimeStyles.AllowInnerWhite" /> values.</summary>
// Token: 0x0400054C RID: 1356
AllowWhiteSpaces = 7,
/// <summary>If the parsed string contains only the time and not the date, the parsing methods assume the Gregorian date with year = 1, month = 1, and day = 1. If this value is not used, the current date is assumed.</summary>
// Token: 0x0400054D RID: 1357
NoCurrentDateDefault = 8,
/// <summary>Date and time are returned as a Coordinated Universal Time (UTC). If the input string denotes a local time, through a time zone specifier or <see cref="F:System.Globalization.DateTimeStyles.AssumeLocal" />, the date and time are converted from the local time to UTC. If the input string denotes a UTC time, through a time zone specifier or <see cref="F:System.Globalization.DateTimeStyles.AssumeUniversal" />, no conversion occurs. If the input string does not denote a local or UTC time, no conversion occurs and the resulting <see cref="P:System.DateTime.Kind" /> property is <see cref="F:System.DateTimeKind.Unspecified" />. </summary>
// Token: 0x0400054E RID: 1358
AdjustToUniversal = 16,
/// <summary>If no time zone is specified in the parsed string, the string is assumed to denote a local time. </summary>
// Token: 0x0400054F RID: 1359
AssumeLocal = 32,
/// <summary>If no time zone is specified in the parsed string, the string is assumed to denote a UTC. </summary>
// Token: 0x04000550 RID: 1360
AssumeUniversal = 64,
/// <summary>The <see cref="T:System.DateTimeKind" /> field of a date is preserved when a <see cref="T:System.DateTime" /> object is converted to a string using the o or r standard format specifier and the string is then converted back to a <see cref="T:System.DateTime" /> object.</summary>
// Token: 0x04000551 RID: 1361
RoundtripKind = 128
}
}
@@ -0,0 +1,69 @@
using System;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Defines the period of daylight saving time.</summary>
// Token: 0x02000183 RID: 387
[ComVisible(true)]
[Serializable]
public class DaylightTime
{
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.DaylightTime" /> class.</summary>
/// <param name="start">The <see cref="T:System.DateTime" /> that represents the date and time when the daylight saving period begins. The value must be in local time. </param>
/// <param name="end">The <see cref="T:System.DateTime" /> that represents the date and time when the daylight saving period ends. The value must be in local time. </param>
/// <param name="delta">The <see cref="T:System.TimeSpan" /> that represents the difference between the standard time and the daylight saving time in ticks. </param>
// Token: 0x06001318 RID: 4888 RVA: 0x0004ADC0 File Offset: 0x00048FC0
public DaylightTime(DateTime start, DateTime end, TimeSpan delta)
{
this.m_start = start;
this.m_end = end;
this.m_delta = delta;
}
/// <summary>Gets the <see cref="T:System.DateTime" /> that represents the date and time when the daylight saving period begins.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that represents the date and time when the daylight saving period begins. The value is in local time.</returns>
// Token: 0x17000348 RID: 840
// (get) Token: 0x06001319 RID: 4889 RVA: 0x0004ADE0 File Offset: 0x00048FE0
public DateTime Start
{
get
{
return this.m_start;
}
}
/// <summary>Gets the <see cref="T:System.DateTime" /> that represents the date and time when the daylight saving period ends.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that represents the date and time when the daylight saving period ends. The value is in local time.</returns>
// Token: 0x17000349 RID: 841
// (get) Token: 0x0600131A RID: 4890 RVA: 0x0004ADE8 File Offset: 0x00048FE8
public DateTime End
{
get
{
return this.m_end;
}
}
/// <summary>Gets the <see cref="T:System.TimeSpan" /> that represents the difference between the standard time and the daylight saving time.</summary>
/// <returns>The <see cref="T:System.TimeSpan" /> that represents the difference between the standard time and the daylight saving time.</returns>
// Token: 0x1700034A RID: 842
// (get) Token: 0x0600131B RID: 4891 RVA: 0x0004ADF0 File Offset: 0x00048FF0
public TimeSpan Delta
{
get
{
return this.m_delta;
}
}
// Token: 0x04000552 RID: 1362
private DateTime m_start;
// Token: 0x04000553 RID: 1363
private DateTime m_end;
// Token: 0x04000554 RID: 1364
private TimeSpan m_delta;
}
}
@@ -0,0 +1,22 @@
using System;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Specifies the culture-specific display of digits.</summary>
// Token: 0x02000184 RID: 388
[ComVisible(true)]
[Serializable]
public enum DigitShapes
{
/// <summary>The digit shape depends on the previous text in the same output. European digits follow Latin scripts; Arabic-Indic digits follow Arabic text; and Thai digits follow Thai text.</summary>
// Token: 0x04000556 RID: 1366
Context,
/// <summary>The digit shape is not changed. Full Unicode compatibility is maintained.</summary>
// Token: 0x04000557 RID: 1367
None,
/// <summary>The digit shape is the native equivalent of the digits from 0 through 9. ASCII digits from 0 through 9 are replaced by equivalent native national digits.</summary>
// Token: 0x04000558 RID: 1368
NativeNational
}
}
@@ -0,0 +1,380 @@
using System;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Represents a calendar that divides time into months, days, years, and eras, and has dates that are based on cycles of the sun and the moon.</summary>
// Token: 0x02000185 RID: 389
[ComVisible(true)]
[Serializable]
public abstract class EastAsianLunisolarCalendar : Calendar
{
// Token: 0x0600131C RID: 4892 RVA: 0x0004ADF8 File Offset: 0x00048FF8
internal EastAsianLunisolarCalendar(CCEastAsianLunisolarEraHandler eraHandler)
{
this.M_EraHandler = eraHandler;
}
/// <summary>Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.</summary>
/// <returns>The last year of a 100-year range that can be represented by a 2-digit year.</returns>
/// <exception cref="T:System.InvalidOperationException">The current <see cref="T:System.Globalization.EastAsianLunisolarCalendar" /> is read-only.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">The value in a set operation is less than 99 or greater than the maximum supported year in the current calendar.</exception>
// Token: 0x1700034B RID: 843
// (get) Token: 0x0600131D RID: 4893 RVA: 0x0004AE08 File Offset: 0x00049008
// (set) Token: 0x0600131E RID: 4894 RVA: 0x0004AE10 File Offset: 0x00049010
public override int TwoDigitYearMax
{
get
{
return this.twoDigitYearMax;
}
set
{
base.CheckReadOnly();
base.M_ArgumentInRange("value", value, 100, this.M_MaxYear);
this.twoDigitYearMax = value;
}
}
// Token: 0x0600131F RID: 4895 RVA: 0x0004AE40 File Offset: 0x00049040
internal void M_CheckDateTime(DateTime time)
{
this.M_EraHandler.CheckDateTime(time);
}
// Token: 0x1700034C RID: 844
// (get) Token: 0x06001320 RID: 4896 RVA: 0x0004AE50 File Offset: 0x00049050
internal virtual int ActualCurrentEra
{
get
{
return 1;
}
}
// Token: 0x06001321 RID: 4897 RVA: 0x0004AE54 File Offset: 0x00049054
internal void M_CheckEra(ref int era)
{
if (era == 0)
{
era = this.ActualCurrentEra;
}
if (!this.M_EraHandler.ValidEra(era))
{
throw new ArgumentException("Era value was not valid.");
}
}
// Token: 0x06001322 RID: 4898 RVA: 0x0004AE90 File Offset: 0x00049090
internal int M_CheckYEG(int year, ref int era)
{
this.M_CheckEra(ref era);
return this.M_EraHandler.GregorianYear(year, era);
}
// Token: 0x06001323 RID: 4899 RVA: 0x0004AEA8 File Offset: 0x000490A8
internal override void M_CheckYE(int year, ref int era)
{
this.M_CheckYEG(year, ref era);
}
// Token: 0x06001324 RID: 4900 RVA: 0x0004AEB4 File Offset: 0x000490B4
internal int M_CheckYMEG(int year, int month, ref int era)
{
int num = this.M_CheckYEG(year, ref era);
if (month < 1 || month > 12)
{
throw new ArgumentOutOfRangeException("month", "Month must be between one and twelve.");
}
return num;
}
// Token: 0x06001325 RID: 4901 RVA: 0x0004AEEC File Offset: 0x000490EC
internal int M_CheckYMDEG(int year, int month, int day, ref int era)
{
int num = this.M_CheckYMEG(year, month, ref era);
base.M_ArgumentInRange("day", day, 1, this.GetDaysInMonth(year, month, era));
return num;
}
/// <summary>Calculates the date that is the specified number of months away from the specified date.</summary>
/// <returns>A new <see cref="T:System.DateTime" /> that results from adding the specified number of months to the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add <paramref name="months" />. </param>
/// <param name="months">The number of months to add. </param>
/// <exception cref="T:System.ArgumentException">The result is outside the supported range of a <see cref="T:System.DateTime" />. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="months" /> is less than -120000 or greater than 120000. -or-<paramref name="time" /> is less than <see cref="P:System.Globalization.Calendar.MinSupportedDateTime" /> or greater than <see cref="P:System.Globalization.Calendar.MaxSupportedDateTime" />.</exception>
// Token: 0x06001326 RID: 4902 RVA: 0x0004AF20 File Offset: 0x00049120
[MonoTODO]
public override DateTime AddMonths(DateTime time, int months)
{
DateTime dateTime = CCEastAsianLunisolarCalendar.AddMonths(time, months);
this.M_CheckDateTime(dateTime);
return dateTime;
}
/// <summary>Calculates the date that is the specified number of years away from the specified date.</summary>
/// <returns>A new <see cref="T:System.DateTime" /> that results from adding the specified number of years to the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add <paramref name="years" />. </param>
/// <param name="years">The number of years to add. </param>
/// <exception cref="T:System.ArgumentException">The result is outside the supported range of a <see cref="T:System.DateTime" />. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="time" /> is less than <see cref="P:System.Globalization.Calendar.MinSupportedDateTime" /> or greater than <see cref="P:System.Globalization.Calendar.MaxSupportedDateTime" />.</exception>
// Token: 0x06001327 RID: 4903 RVA: 0x0004AF40 File Offset: 0x00049140
[MonoTODO]
public override DateTime AddYears(DateTime time, int years)
{
DateTime dateTime = CCEastAsianLunisolarCalendar.AddYears(time, years);
this.M_CheckDateTime(dateTime);
return dateTime;
}
/// <summary>Calculates the day of the month in the specified date.</summary>
/// <returns>An integer from 1 through 31 that represents the day of the month specified in the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x06001328 RID: 4904 RVA: 0x0004AF60 File Offset: 0x00049160
[MonoTODO]
public override int GetDayOfMonth(DateTime time)
{
this.M_CheckDateTime(time);
return CCEastAsianLunisolarCalendar.GetDayOfMonth(time);
}
/// <summary>Calculates the day of the week in the specified date.</summary>
/// <returns>One of the <see cref="T:System.DayOfWeek" /> values that represents the day of the week specified in the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="time" /> is less than <see cref="P:System.Globalization.Calendar.MinSupportedDateTime" /> or greater than <see cref="P:System.Globalization.Calendar.MaxSupportedDateTime" />.</exception>
// Token: 0x06001329 RID: 4905 RVA: 0x0004AF70 File Offset: 0x00049170
[MonoTODO]
public override DayOfWeek GetDayOfWeek(DateTime time)
{
this.M_CheckDateTime(time);
int num = CCFixed.FromDateTime(time);
return CCFixed.day_of_week(num);
}
/// <summary>Calculates the day of the year in the specified date.</summary>
/// <returns>An integer from 1 through 354 in a common year, or 1 through 384 in a leap year, that represents the day of the year specified in the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x0600132A RID: 4906 RVA: 0x0004AF94 File Offset: 0x00049194
[MonoTODO]
public override int GetDayOfYear(DateTime time)
{
this.M_CheckDateTime(time);
return CCEastAsianLunisolarCalendar.GetDayOfYear(time);
}
/// <summary>Calculates the number of days in the specified month of the specified year and era.</summary>
/// <returns>The number of days in the specified month of the specified year and era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 through 12 in a common year, or 1 through 13 in a leap year, that represents the month. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" />, <paramref name="month" />, or <paramref name="era" /> is outside the range supported by this calendar. </exception>
// Token: 0x0600132B RID: 4907 RVA: 0x0004AFA4 File Offset: 0x000491A4
[MonoTODO]
public override int GetDaysInMonth(int year, int month, int era)
{
int num = this.M_CheckYMEG(year, month, ref era);
return CCEastAsianLunisolarCalendar.GetDaysInMonth(num, month);
}
/// <summary>Calculates the number of days in the specified year and era.</summary>
/// <returns>The number of days in the specified year and era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> or <paramref name="era" /> is outside the range supported by this calendar. </exception>
// Token: 0x0600132C RID: 4908 RVA: 0x0004AFC4 File Offset: 0x000491C4
[MonoTODO]
public override int GetDaysInYear(int year, int era)
{
int num = this.M_CheckYEG(year, ref era);
return CCEastAsianLunisolarCalendar.GetDaysInYear(num);
}
/// <summary>Calculates the leap month for the specified year and era.</summary>
/// <returns>A positive integer from 1 through 13 that indicates the leap month in the specified year and era. -or-Zero if this calendar does not support a leap month, or if the <paramref name="year" /> and <paramref name="era" /> parameters do not specify a leap year.</returns>
/// <param name="year">An integer that represents the year.</param>
/// <param name="era">An integer that represents the era.</param>
// Token: 0x0600132D RID: 4909 RVA: 0x0004AFE4 File Offset: 0x000491E4
[MonoTODO]
public override int GetLeapMonth(int year, int era)
{
return base.GetLeapMonth(year, era);
}
/// <summary>Returns the month in the specified date.</summary>
/// <returns>An integer from 1 to 13 that represents the month specified in the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x0600132E RID: 4910 RVA: 0x0004AFF0 File Offset: 0x000491F0
[MonoTODO]
public override int GetMonth(DateTime time)
{
this.M_CheckDateTime(time);
return CCEastAsianLunisolarCalendar.GetMonth(time);
}
/// <summary>Calculates the number of months in the specified year and era.</summary>
/// <returns>The number of months in the specified year in the specified era. The return value is 12 months in a common year or 13 months in a leap year.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> or <paramref name="era" /> is outside the range supported by this calendar. </exception>
// Token: 0x0600132F RID: 4911 RVA: 0x0004B000 File Offset: 0x00049200
[MonoTODO]
public override int GetMonthsInYear(int year, int era)
{
this.M_CheckYE(year, ref era);
return (!this.IsLeapYear(year, era)) ? 12 : 13;
}
/// <summary>Returns the year in the specified date.</summary>
/// <returns>An integer that represents the year in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x06001330 RID: 4912 RVA: 0x0004B024 File Offset: 0x00049224
public override int GetYear(DateTime time)
{
int num = CCFixed.FromDateTime(time);
int num2;
return this.M_EraHandler.EraYear(out num2, num);
}
/// <summary>Determines whether the specified date in the specified era is a leap day.</summary>
/// <returns>true if the specified day is a leap day; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 through 13 that represents the month. </param>
/// <param name="day">An integer from 1 through 31 that represents the day. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" />, <paramref name="month" />, <paramref name="day" />, or <paramref name="era" /> is outside the range supported by this calendar. </exception>
// Token: 0x06001331 RID: 4913 RVA: 0x0004B048 File Offset: 0x00049248
public override bool IsLeapDay(int year, int month, int day, int era)
{
int num = this.M_CheckYMDEG(year, month, day, ref era);
return CCEastAsianLunisolarCalendar.IsLeapMonth(num, month);
}
/// <summary>Determines whether the specified month in the specified year and era is a leap month.</summary>
/// <returns>true if the <paramref name="month" /> parameter is a leap month; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 through 13 that represents the month. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" />, <paramref name="month" />, or <paramref name="era" /> is outside the range supported by this calendar. </exception>
// Token: 0x06001332 RID: 4914 RVA: 0x0004B068 File Offset: 0x00049268
[MonoTODO]
public override bool IsLeapMonth(int year, int month, int era)
{
int num = this.M_CheckYMEG(year, month, ref era);
return CCEastAsianLunisolarCalendar.IsLeapMonth(num, month);
}
/// <summary>Determines whether the specified year in the specified era is a leap year.</summary>
/// <returns>true if the specified year is a leap year; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> or <paramref name="era" /> is outside the range supported by this calendar. </exception>
// Token: 0x06001333 RID: 4915 RVA: 0x0004B088 File Offset: 0x00049288
public override bool IsLeapYear(int year, int era)
{
int num = this.M_CheckYEG(year, ref era);
return CCEastAsianLunisolarCalendar.IsLeapYear(num);
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is set to the specified date, time, and era.</summary>
/// <returns>A <see cref="T:System.DateTime" /> that is set to the specified date, time, and era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 through 13 that represents the month. </param>
/// <param name="day">An integer from 1 through 31 that represents the day. </param>
/// <param name="hour">An integer from 0 through 23 that represents the hour. </param>
/// <param name="minute">An integer from 0 through 59 that represents the minute. </param>
/// <param name="second">An integer from 0 through 59 that represents the second. </param>
/// <param name="millisecond">An integer from 0 through 999 that represents the millisecond. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" />, <paramref name="month" />, <paramref name="day" />, <paramref name="hour" />, <paramref name="minute" />, <paramref name="second" />, <paramref name="millisecond" />, or <paramref name="era" /> is outside the range supported by this calendar. </exception>
// Token: 0x06001334 RID: 4916 RVA: 0x0004B0A8 File Offset: 0x000492A8
[MonoTODO]
public override DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era)
{
int num = this.M_CheckYMDEG(year, month, day, ref era);
base.M_CheckHMSM(hour, minute, second, millisecond);
return CCGregorianCalendar.ToDateTime(num, month, day, hour, minute, second, millisecond);
}
/// <summary>Converts the specified year to a four-digit year.</summary>
/// <returns>An integer that contains the four-digit representation of the <paramref name="year" /> parameter.</returns>
/// <param name="year">A two-digit or four-digit integer that represents the year to convert. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by this calendar. </exception>
// Token: 0x06001335 RID: 4917 RVA: 0x0004B0E0 File Offset: 0x000492E0
[MonoTODO]
public override int ToFourDigitYear(int year)
{
if (year < 0)
{
throw new ArgumentOutOfRangeException("year", "Non-negative number required.");
}
int num = 0;
this.M_CheckYE(year, ref num);
return year;
}
/// <summary>Gets a value indicating whether the current calendar is solar-based, lunar-based, or a combination of both.</summary>
/// <returns>This property always returns the <see cref="F:System.Globalization.CalendarAlgorithmType.LunisolarCalendar" /> value.</returns>
// Token: 0x1700034D RID: 845
// (get) Token: 0x06001336 RID: 4918 RVA: 0x0004B110 File Offset: 0x00049310
public override CalendarAlgorithmType AlgorithmType
{
get
{
return CalendarAlgorithmType.LunisolarCalendar;
}
}
/// <summary>Calculates the celestial stem of the specified year in the sexagenary (60-year) cycle.</summary>
/// <returns>A number from 1 through 10.</returns>
/// <param name="sexagenaryYear">An integer from 1 through 60 that represents a year in the sexagenary cycle. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="sexagenaryYear" /> is less than 1 or greater than 60.</exception>
// Token: 0x06001337 RID: 4919 RVA: 0x0004B114 File Offset: 0x00049314
public int GetCelestialStem(int sexagenaryYear)
{
if (sexagenaryYear < 1 || 60 < sexagenaryYear)
{
throw new ArgumentOutOfRangeException("sexagendaryYear is less than 0 or greater than 60");
}
return (sexagenaryYear - 1) % 10 + 1;
}
/// <summary>Calculates the year in the sexagenary (60-year) cycle that corresponds to the specified date.</summary>
/// <returns>A number from 1 through 60 in the sexagenary cycle that corresponds to the <paramref name="date" /> parameter.</returns>
/// <param name="time">A <see cref="T:System.DateTime" /> to read.</param>
// Token: 0x06001338 RID: 4920 RVA: 0x0004B144 File Offset: 0x00049344
public virtual int GetSexagenaryYear(DateTime time)
{
return (this.GetYear(time) - 1900) % 60;
}
/// <summary>Calculates the terrestrial branch of the specified year in the sexagenary (60-year) cycle.</summary>
/// <returns>An integer from 1 through 12.</returns>
/// <param name="sexagenaryYear">An integer from 1 through 60 that represents a year in the sexagenary cycle.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="sexagenaryYear" /> is less than 1 or greater than 60.</exception>
// Token: 0x06001339 RID: 4921 RVA: 0x0004B158 File Offset: 0x00049358
public int GetTerrestrialBranch(int sexagenaryYear)
{
if (sexagenaryYear < 1 || 60 < sexagenaryYear)
{
throw new ArgumentOutOfRangeException("sexagendaryYear is less than 0 or greater than 60");
}
return (sexagenaryYear - 1) % 12 + 1;
}
// Token: 0x04000559 RID: 1369
internal readonly CCEastAsianLunisolarEraHandler M_EraHandler;
}
}
@@ -0,0 +1,393 @@
using System;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Represents the Gregorian calendar.</summary>
// Token: 0x02000186 RID: 390
[ComVisible(true)]
[MonoTODO("Serialization format not compatible with .NET")]
[Serializable]
public class GregorianCalendar : Calendar
{
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.GregorianCalendar" /> class using the specified <see cref="T:System.Globalization.GregorianCalendarTypes" /> value.</summary>
/// <param name="type">The <see cref="T:System.Globalization.GregorianCalendarTypes" /> value that denotes which language version of the calendar to create. </param>
// Token: 0x0600133A RID: 4922 RVA: 0x0004B188 File Offset: 0x00049388
public GregorianCalendar(GregorianCalendarTypes type)
{
this.CalendarType = type;
this.M_AbbrEraNames = new string[] { "AD" };
this.M_EraNames = new string[] { "A.D." };
if (this.twoDigitYearMax == 99)
{
this.twoDigitYearMax = 2029;
}
}
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.GregorianCalendar" /> class using the default <see cref="T:System.Globalization.GregorianCalendarTypes" /> value.</summary>
// Token: 0x0600133B RID: 4923 RVA: 0x0004B1E4 File Offset: 0x000493E4
public GregorianCalendar()
: this(GregorianCalendarTypes.Localized)
{
}
/// <summary>Gets the list of eras in the <see cref="T:System.Globalization.GregorianCalendar" />.</summary>
/// <returns>An array of integers that represents the eras in the <see cref="T:System.Globalization.GregorianCalendar" />.</returns>
// Token: 0x1700034E RID: 846
// (get) Token: 0x0600133C RID: 4924 RVA: 0x0004B1F0 File Offset: 0x000493F0
public override int[] Eras
{
get
{
return new int[] { 1 };
}
}
/// <summary>Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.</summary>
/// <returns>The last year of a 100-year range that can be represented by a 2-digit year.</returns>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.RegistryPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x1700034F RID: 847
// (get) Token: 0x0600133D RID: 4925 RVA: 0x0004B1FC File Offset: 0x000493FC
// (set) Token: 0x0600133E RID: 4926 RVA: 0x0004B204 File Offset: 0x00049404
public override int TwoDigitYearMax
{
get
{
return this.twoDigitYearMax;
}
set
{
base.CheckReadOnly();
base.M_ArgumentInRange("value", value, 100, this.M_MaxYear);
this.twoDigitYearMax = value;
}
}
/// <summary>Gets or sets the <see cref="T:System.Globalization.GregorianCalendarTypes" /> value that denotes the language version of the current <see cref="T:System.Globalization.GregorianCalendar" />.</summary>
/// <returns>A <see cref="T:System.Globalization.GregorianCalendarTypes" /> value that denotes the language version of the current <see cref="T:System.Globalization.GregorianCalendar" />.</returns>
// Token: 0x17000350 RID: 848
// (get) Token: 0x0600133F RID: 4927 RVA: 0x0004B234 File Offset: 0x00049434
// (set) Token: 0x06001340 RID: 4928 RVA: 0x0004B23C File Offset: 0x0004943C
public virtual GregorianCalendarTypes CalendarType
{
get
{
return this.m_type;
}
set
{
base.CheckReadOnly();
this.m_type = value;
}
}
// Token: 0x06001341 RID: 4929 RVA: 0x0004B24C File Offset: 0x0004944C
internal void M_CheckEra(ref int era)
{
if (era == 0)
{
era = 1;
}
if (era != 1)
{
throw new ArgumentException("Era value was not valid.");
}
}
// Token: 0x06001342 RID: 4930 RVA: 0x0004B26C File Offset: 0x0004946C
internal override void M_CheckYE(int year, ref int era)
{
this.M_CheckEra(ref era);
base.M_ArgumentInRange("year", year, 1, 9999);
}
// Token: 0x06001343 RID: 4931 RVA: 0x0004B294 File Offset: 0x00049494
internal void M_CheckYME(int year, int month, ref int era)
{
this.M_CheckYE(year, ref era);
if (month < 1 || month > 12)
{
throw new ArgumentOutOfRangeException("month", "Month must be between one and twelve.");
}
}
// Token: 0x06001344 RID: 4932 RVA: 0x0004B2C0 File Offset: 0x000494C0
internal void M_CheckYMDE(int year, int month, int day, ref int era)
{
this.M_CheckYME(year, month, ref era);
base.M_ArgumentInRange("day", day, 1, this.GetDaysInMonth(year, month, era));
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of months away from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of months to the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add months. </param>
/// <param name="months">The number of months to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="months" /> is less than -120000.-or- <paramref name="months" /> is greater than 120000. </exception>
// Token: 0x06001345 RID: 4933 RVA: 0x0004B2F0 File Offset: 0x000494F0
public override DateTime AddMonths(DateTime time, int months)
{
return CCGregorianCalendar.AddMonths(time, months);
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of years away from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of years to the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add years. </param>
/// <param name="years">The number of years to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range. </exception>
// Token: 0x06001346 RID: 4934 RVA: 0x0004B2FC File Offset: 0x000494FC
public override DateTime AddYears(DateTime time, int years)
{
return CCGregorianCalendar.AddYears(time, years);
}
/// <summary>Returns the day of the month in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 1 to 31 that represents the day of the month in <paramref name="time" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x06001347 RID: 4935 RVA: 0x0004B308 File Offset: 0x00049508
public override int GetDayOfMonth(DateTime time)
{
return CCGregorianCalendar.GetDayOfMonth(time);
}
/// <summary>Returns the day of the week in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>A <see cref="T:System.DayOfWeek" /> value that represents the day of the week in <paramref name="time" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x06001348 RID: 4936 RVA: 0x0004B310 File Offset: 0x00049510
public override DayOfWeek GetDayOfWeek(DateTime time)
{
int num = CCFixed.FromDateTime(time);
return CCFixed.day_of_week(num);
}
/// <summary>Returns the day of the year in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 1 to 366 that represents the day of the year in <paramref name="time" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x06001349 RID: 4937 RVA: 0x0004B32C File Offset: 0x0004952C
public override int GetDayOfYear(DateTime time)
{
return CCGregorianCalendar.GetDayOfYear(time);
}
/// <summary>Returns the number of days in the specified month in the specified year in the specified era.</summary>
/// <returns>The number of days in the specified month in the specified year in the specified era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="era" /> is outside the range supported by the calendar.-or- <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar. </exception>
// Token: 0x0600134A RID: 4938 RVA: 0x0004B334 File Offset: 0x00049534
public override int GetDaysInMonth(int year, int month, int era)
{
this.M_CheckYME(year, month, ref era);
return CCGregorianCalendar.GetDaysInMonth(year, month);
}
/// <summary>Returns the number of days in the specified year in the specified era.</summary>
/// <returns>The number of days in the specified year in the specified era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="era" /> is outside the range supported by the calendar.-or- <paramref name="year" /> is outside the range supported by the calendar.</exception>
// Token: 0x0600134B RID: 4939 RVA: 0x0004B348 File Offset: 0x00049548
public override int GetDaysInYear(int year, int era)
{
this.M_CheckYE(year, ref era);
return CCGregorianCalendar.GetDaysInYear(year);
}
/// <summary>Returns the era in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer that represents the era in <paramref name="time" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x0600134C RID: 4940 RVA: 0x0004B35C File Offset: 0x0004955C
public override int GetEra(DateTime time)
{
return 1;
}
/// <summary>Calculates the leap month for a specified year and era.</summary>
/// <returns>Always 0 because the <see cref="T:System.Globalization.GregorianCalendar" /> type does not recognize leap months.</returns>
/// <param name="year">A year.</param>
/// <param name="era">An era. Specify either <see cref="F:System.Globalization.GregorianCalendar.ADEra" /> or GregorianCalendar.Eras[Calendar.CurrentEra].</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is less than the Gregorian calendar year 1 or greater than the Gregorian calendar year 9999.-or-<paramref name="era" /> is not <see cref="F:System.Globalization.GregorianCalendar.ADEra" /> or GregorianCalendar.Eras[Calendar.CurrentEra].</exception>
// Token: 0x0600134D RID: 4941 RVA: 0x0004B360 File Offset: 0x00049560
[ComVisible(false)]
public override int GetLeapMonth(int year, int era)
{
return 0;
}
/// <summary>Returns the month in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 1 to 12 that represents the month in <paramref name="time" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x0600134E RID: 4942 RVA: 0x0004B364 File Offset: 0x00049564
public override int GetMonth(DateTime time)
{
return CCGregorianCalendar.GetMonth(time);
}
/// <summary>Returns the number of months in the specified year in the specified era.</summary>
/// <returns>The number of months in the specified year in the specified era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="era" /> is outside the range supported by the calendar.-or- <paramref name="year" /> is outside the range supported by the calendar. </exception>
// Token: 0x0600134F RID: 4943 RVA: 0x0004B36C File Offset: 0x0004956C
public override int GetMonthsInYear(int year, int era)
{
this.M_CheckYE(year, ref era);
return 12;
}
/// <summary>Returns the week of the year that includes the date in the specified <see cref="T:System.DateTime" /> object.</summary>
/// <returns>A 1-based integer that represents the week of the year that includes the date in the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> object to read. </param>
/// <param name="rule">One of the <see cref="T:System.Globalization.CalendarWeekRule" /> values that defines a calendar week. </param>
/// <param name="firstDayOfWeek">One of the <see cref="T:System.DayOfWeek" /> values that represents the first day of the week. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="firstDayOfWeek" /> is outside the range supported by the calendar.-or- <paramref name="rule" /> is not a valid <see cref="T:System.Globalization.CalendarWeekRule" /> value. </exception>
// Token: 0x06001350 RID: 4944 RVA: 0x0004B37C File Offset: 0x0004957C
[ComVisible(false)]
public override int GetWeekOfYear(DateTime time, CalendarWeekRule rule, DayOfWeek firstDayOfWeek)
{
return base.GetWeekOfYear(time, rule, firstDayOfWeek);
}
/// <summary>Returns the year in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer that represents the year in <paramref name="time" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x06001351 RID: 4945 RVA: 0x0004B388 File Offset: 0x00049588
public override int GetYear(DateTime time)
{
return CCGregorianCalendar.GetYear(time);
}
/// <summary>Determines whether the specified date in the specified era is a leap day.</summary>
/// <returns>true if the specified day is a leap day; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="day">An integer from 1 to 31 that represents the day. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="era" /> is outside the range supported by the calendar. -or- <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="day" /> is outside the range supported by the calendar. </exception>
// Token: 0x06001352 RID: 4946 RVA: 0x0004B390 File Offset: 0x00049590
public override bool IsLeapDay(int year, int month, int day, int era)
{
this.M_CheckYMDE(year, month, day, ref era);
return CCGregorianCalendar.IsLeapDay(year, month, day);
}
/// <summary>Determines whether the specified month in the specified year in the specified era is a leap month.</summary>
/// <returns>This method always returns false, unless overridden by a derived class.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="era" /> is outside the range supported by the calendar.-or- <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar. </exception>
// Token: 0x06001353 RID: 4947 RVA: 0x0004B3A8 File Offset: 0x000495A8
public override bool IsLeapMonth(int year, int month, int era)
{
this.M_CheckYME(year, month, ref era);
return false;
}
/// <summary>Determines whether the specified year in the specified era is a leap year.</summary>
/// <returns>true if the specified year is a leap year; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="era" /> is outside the range supported by the calendar.-or- <paramref name="year" /> is outside the range supported by the calendar. </exception>
// Token: 0x06001354 RID: 4948 RVA: 0x0004B3B8 File Offset: 0x000495B8
public override bool IsLeapYear(int year, int era)
{
this.M_CheckYE(year, ref era);
return CCGregorianCalendar.is_leap_year(year);
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is set to the specified date and time in the specified era.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that is set to the specified date and time in the current era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="day">An integer from 1 to 31 that represents the day. </param>
/// <param name="hour">An integer from 0 to 23 that represents the hour. </param>
/// <param name="minute">An integer from 0 to 59 that represents the minute. </param>
/// <param name="second">An integer from 0 to 59 that represents the second. </param>
/// <param name="millisecond">An integer from 0 to 999 that represents the millisecond. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="era" /> is outside the range supported by the calendar.-or- <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="day" /> is outside the range supported by the calendar.-or- <paramref name="hour" /> is less than zero or greater than 23.-or- <paramref name="minute" /> is less than zero or greater than 59.-or- <paramref name="second" /> is less than zero or greater than 59.-or- <paramref name="millisecond" /> is less than zero or greater than 999. </exception>
// Token: 0x06001355 RID: 4949 RVA: 0x0004B3CC File Offset: 0x000495CC
public override DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era)
{
this.M_CheckYMDE(year, month, day, ref era);
base.M_CheckHMSM(hour, minute, second, millisecond);
return CCGregorianCalendar.ToDateTime(year, month, day, hour, minute, second, millisecond);
}
/// <summary>Converts the specified year to a four-digit year by using the <see cref="P:System.Globalization.GregorianCalendar.TwoDigitYearMax" /> property to determine the appropriate century.</summary>
/// <returns>An integer that contains the four-digit representation of <paramref name="year" />.</returns>
/// <param name="year">A two-digit or four-digit integer that represents the year to convert. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar. </exception>
// Token: 0x06001356 RID: 4950 RVA: 0x0004B404 File Offset: 0x00049604
public override int ToFourDigitYear(int year)
{
return base.ToFourDigitYear(year);
}
/// <summary>Gets the earliest date and time supported by the <see cref="T:System.Globalization.GregorianCalendar" /> type.</summary>
/// <returns>The earliest date and time supported by the <see cref="T:System.Globalization.GregorianCalendar" /> type, which is the first moment of January 1, 0001 C.E. and is equivalent to <see cref="F:System.DateTime.MinValue" />.</returns>
// Token: 0x17000351 RID: 849
// (get) Token: 0x06001357 RID: 4951 RVA: 0x0004B410 File Offset: 0x00049610
[ComVisible(false)]
public override DateTime MinSupportedDateTime
{
get
{
DateTime? min = GregorianCalendar.Min;
if (min == null)
{
GregorianCalendar.Min = new DateTime?(new DateTime(1, 1, 1, 0, 0, 0));
}
return GregorianCalendar.Min.Value;
}
}
/// <summary>Gets the latest date and time supported by the <see cref="T:System.Globalization.GregorianCalendar" /> type.</summary>
/// <returns>The latest date and time supported by the <see cref="T:System.Globalization.GregorianCalendar" /> type, which is the last moment of December 31, 9999 C.E. and is equivalent to <see cref="F:System.DateTime.MaxValue" />.</returns>
// Token: 0x17000352 RID: 850
// (get) Token: 0x06001358 RID: 4952 RVA: 0x0004B454 File Offset: 0x00049654
[ComVisible(false)]
public override DateTime MaxSupportedDateTime
{
get
{
DateTime? max = GregorianCalendar.Max;
if (max == null)
{
GregorianCalendar.Max = new DateTime?(new DateTime(9999, 12, 31, 11, 59, 59));
}
return GregorianCalendar.Max.Value;
}
}
/// <summary>Represents the current era. This field is constant.</summary>
// Token: 0x0400055A RID: 1370
public const int ADEra = 1;
// Token: 0x0400055B RID: 1371
[NonSerialized]
internal GregorianCalendarTypes m_type;
// Token: 0x0400055C RID: 1372
private static DateTime? Min;
// Token: 0x0400055D RID: 1373
private static DateTime? Max;
}
}
@@ -0,0 +1,31 @@
using System;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Defines the different language versions of the Gregorian calendar.</summary>
// Token: 0x02000187 RID: 391
[ComVisible(true)]
[Serializable]
public enum GregorianCalendarTypes
{
/// <summary>Refers to the localized version of the Gregorian calendar, based on the language of the <see cref="T:System.Globalization.CultureInfo" /> that uses the <see cref="T:System.Globalization.DateTimeFormatInfo" />.</summary>
// Token: 0x0400055F RID: 1375
Localized = 1,
/// <summary>Refers to the U.S. English version of the Gregorian calendar.</summary>
// Token: 0x04000560 RID: 1376
USEnglish,
/// <summary>Refers to the Middle East French version of the Gregorian calendar.</summary>
// Token: 0x04000561 RID: 1377
MiddleEastFrench = 9,
/// <summary>Refers to the Arabic version of the Gregorian calendar.</summary>
// Token: 0x04000562 RID: 1378
Arabic,
/// <summary>Refers to the transliterated English version of the Gregorian calendar.</summary>
// Token: 0x04000563 RID: 1379
TransliteratedEnglish,
/// <summary>Refers to the transliterated French version of the Gregorian calendar.</summary>
// Token: 0x04000564 RID: 1380
TransliteratedFrench
}
}
@@ -0,0 +1,495 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Represents the Hebrew calendar.</summary>
// Token: 0x02000188 RID: 392
[MonoTODO("Serialization format not compatible with.NET")]
[ComVisible(true)]
[Serializable]
public class HebrewCalendar : Calendar
{
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.HebrewCalendar" /> class.</summary>
// Token: 0x06001359 RID: 4953 RVA: 0x0004B4A0 File Offset: 0x000496A0
public HebrewCalendar()
{
this.M_AbbrEraNames = new string[] { "A.M." };
this.M_EraNames = new string[] { "Anno Mundi" };
if (this.twoDigitYearMax == 99)
{
this.twoDigitYearMax = 5790;
}
}
// Token: 0x17000353 RID: 851
// (get) Token: 0x0600135B RID: 4955 RVA: 0x0004B52C File Offset: 0x0004972C
internal override int M_MaxYear
{
get
{
return 6000;
}
}
/// <summary>Gets the list of eras in the <see cref="T:System.Globalization.HebrewCalendar" />.</summary>
/// <returns>An array of integers that represents the eras in the <see cref="T:System.Globalization.HebrewCalendar" /> type. The return value is always an array containing one element equal to <see cref="F:System.Globalization.HebrewCalendar.HebrewEra" />. </returns>
// Token: 0x17000354 RID: 852
// (get) Token: 0x0600135C RID: 4956 RVA: 0x0004B534 File Offset: 0x00049734
public override int[] Eras
{
get
{
return new int[] { HebrewCalendar.HebrewEra };
}
}
/// <summary>Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.</summary>
/// <returns>The last year of a 100-year range that can be represented by a 2-digit year.</returns>
/// <exception cref="T:System.InvalidOperationException">The current <see cref="T:System.Globalization.HebrewCalendar" /> object is read-only.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">In a set operation, the Hebrew calendar year value is less than 5343 but is not 99, or the year value is greater than 5999. </exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.RegistryPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x17000355 RID: 853
// (get) Token: 0x0600135D RID: 4957 RVA: 0x0004B544 File Offset: 0x00049744
// (set) Token: 0x0600135E RID: 4958 RVA: 0x0004B54C File Offset: 0x0004974C
public override int TwoDigitYearMax
{
get
{
return this.twoDigitYearMax;
}
set
{
base.CheckReadOnly();
base.M_ArgumentInRange("value", value, 5343, this.M_MaxYear);
this.twoDigitYearMax = value;
}
}
// Token: 0x0600135F RID: 4959 RVA: 0x0004B580 File Offset: 0x00049780
internal void M_CheckDateTime(DateTime time)
{
if (time.Ticks < 499147488000000000L || time.Ticks > 706783967999999999L)
{
throw new ArgumentOutOfRangeException("time", "Only hebrew years between 5343 and 6000, inclusive, are supported.");
}
}
// Token: 0x06001360 RID: 4960 RVA: 0x0004B5C8 File Offset: 0x000497C8
internal void M_CheckEra(ref int era)
{
if (era == 0)
{
era = HebrewCalendar.HebrewEra;
}
if (era != HebrewCalendar.HebrewEra)
{
throw new ArgumentException("Era value was not valid.");
}
}
// Token: 0x06001361 RID: 4961 RVA: 0x0004B5F0 File Offset: 0x000497F0
internal override void M_CheckYE(int year, ref int era)
{
this.M_CheckEra(ref era);
if (year < 5343 || year > this.M_MaxYear)
{
throw new ArgumentOutOfRangeException("year", "Only hebrew years between 5343 and 6000, inclusive, are supported.");
}
}
// Token: 0x06001362 RID: 4962 RVA: 0x0004B62C File Offset: 0x0004982C
internal void M_CheckYME(int year, int month, ref int era)
{
this.M_CheckYE(year, ref era);
int num = CCHebrewCalendar.last_month_of_year(year);
if (month < 1 || month > num)
{
StringWriter stringWriter = new StringWriter();
stringWriter.Write("Month must be between 1 and {0}.", num);
throw new ArgumentOutOfRangeException("month", stringWriter.ToString());
}
}
// Token: 0x06001363 RID: 4963 RVA: 0x0004B680 File Offset: 0x00049880
internal void M_CheckYMDE(int year, int month, int day, ref int era)
{
this.M_CheckYME(year, month, ref era);
base.M_ArgumentInRange("day", day, 1, this.GetDaysInMonth(year, month, era));
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of months away from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of months to the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add <paramref name="months" />. </param>
/// <param name="months">The number of months to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="months" /> is less than -120,000 or greater than 120,000. </exception>
// Token: 0x06001364 RID: 4964 RVA: 0x0004B6B0 File Offset: 0x000498B0
public override DateTime AddMonths(DateTime time, int months)
{
DateTime dateTime;
if (months == 0)
{
dateTime = time;
}
else
{
int num = CCFixed.FromDateTime(time);
int num2;
int num3;
int num4;
CCHebrewCalendar.dmy_from_fixed(out num2, out num3, out num4, num);
num3 = this.M_Month(num3, num4);
if (months < 0)
{
while (months < 0)
{
if (num3 + months > 0)
{
num3 += months;
months = 0;
}
else
{
months += num3;
num4--;
num3 = this.GetMonthsInYear(num4);
}
}
}
else
{
while (months > 0)
{
int monthsInYear = this.GetMonthsInYear(num4);
if (num3 + months <= monthsInYear)
{
num3 += months;
months = 0;
}
else
{
months -= monthsInYear - num3 + 1;
num3 = 1;
num4++;
}
}
}
dateTime = this.ToDateTime(num4, num3, num2, 0, 0, 0, 0).Add(time.TimeOfDay);
}
this.M_CheckDateTime(dateTime);
return dateTime;
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of years away from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of years to the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add <paramref name="years" />. </param>
/// <param name="years">The number of years to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range. </exception>
// Token: 0x06001365 RID: 4965 RVA: 0x0004B788 File Offset: 0x00049988
public override DateTime AddYears(DateTime time, int years)
{
int num = CCFixed.FromDateTime(time);
int num2;
int num3;
int num4;
CCHebrewCalendar.dmy_from_fixed(out num2, out num3, out num4, num);
num4 += years;
num = CCHebrewCalendar.fixed_from_dmy(num2, num3, num4);
DateTime dateTime = CCFixed.ToDateTime(num).Add(time.TimeOfDay);
this.M_CheckDateTime(dateTime);
return dateTime;
}
/// <summary>Returns the day of the month in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 1 to 30 that represents the day of the month in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x06001366 RID: 4966 RVA: 0x0004B7D8 File Offset: 0x000499D8
public override int GetDayOfMonth(DateTime time)
{
this.M_CheckDateTime(time);
int num = CCFixed.FromDateTime(time);
return CCHebrewCalendar.day_from_fixed(num);
}
/// <summary>Returns the day of the week in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>A <see cref="T:System.DayOfWeek" /> value that represents the day of the week in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x06001367 RID: 4967 RVA: 0x0004B7FC File Offset: 0x000499FC
public override DayOfWeek GetDayOfWeek(DateTime time)
{
this.M_CheckDateTime(time);
int num = CCFixed.FromDateTime(time);
return CCFixed.day_of_week(num);
}
/// <summary>Returns the day of the year in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 1 to 385 that represents the day of the year in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="time" /> is earlier than September 17, 1583 in the Gregorian calendar, or greater than <see cref="P:System.Globalization.HebrewCalendar.MaxSupportedDateTime" />. </exception>
// Token: 0x06001368 RID: 4968 RVA: 0x0004B820 File Offset: 0x00049A20
public override int GetDayOfYear(DateTime time)
{
this.M_CheckDateTime(time);
int num = CCFixed.FromDateTime(time);
int num2 = CCHebrewCalendar.year_from_fixed(num);
int num3 = CCHebrewCalendar.fixed_from_dmy(1, 7, num2);
return num - num3 + 1;
}
// Token: 0x06001369 RID: 4969 RVA: 0x0004B850 File Offset: 0x00049A50
internal int M_CCMonth(int month, int year)
{
if (month <= 6)
{
return 6 + month;
}
int num = CCHebrewCalendar.last_month_of_year(year);
if (num == 12)
{
return month - 6;
}
return (month > 7) ? (month - 7) : (6 + month);
}
// Token: 0x0600136A RID: 4970 RVA: 0x0004B890 File Offset: 0x00049A90
internal int M_Month(int ccmonth, int year)
{
if (ccmonth >= 7)
{
return ccmonth - 6;
}
int num = CCHebrewCalendar.last_month_of_year(year);
return ccmonth + ((num != 12) ? 7 : 6);
}
/// <summary>Returns the number of days in the specified month in the specified year in the specified era.</summary>
/// <returns>The number of days in the specified month in the specified year in the specified era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 13 that represents the month. </param>
/// <param name="era">An integer that represents the era. Specify either <see cref="F:System.Globalization.HebrewCalendar.HebrewEra" /> or <see cref="F:System.Globalization.Calendar.CurrentEra" />.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" />, <paramref name="month" />, or <paramref name="era" /> is outside the range supported by the current <see cref="T:System.Globalization.HebrewCalendar" /> object. </exception>
// Token: 0x0600136B RID: 4971 RVA: 0x0004B8C0 File Offset: 0x00049AC0
public override int GetDaysInMonth(int year, int month, int era)
{
this.M_CheckYME(year, month, ref era);
int num = this.M_CCMonth(month, year);
return CCHebrewCalendar.last_day_of_month(num, year);
}
/// <summary>Returns the number of days in the specified year in the specified era.</summary>
/// <returns>The number of days in the specified year in the specified era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. Specify either <see cref="F:System.Globalization.HebrewCalendar.HebrewEra" /> or <see cref="F:System.Globalization.Calendar.CurrentEra" />.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> or <paramref name="era" /> is outside the range supported by the current <see cref="T:System.Globalization.HebrewCalendar" /> object. </exception>
// Token: 0x0600136C RID: 4972 RVA: 0x0004B8E8 File Offset: 0x00049AE8
public override int GetDaysInYear(int year, int era)
{
this.M_CheckYE(year, ref era);
int num = CCHebrewCalendar.fixed_from_dmy(1, 7, year);
int num2 = CCHebrewCalendar.fixed_from_dmy(1, 7, year + 1);
return num2 - num;
}
/// <summary>Returns the era in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer that represents the era in the specified <see cref="T:System.DateTime" />. The return value is always <see cref="F:System.Globalization.HebrewCalendar.HebrewEra" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x0600136D RID: 4973 RVA: 0x0004B918 File Offset: 0x00049B18
public override int GetEra(DateTime time)
{
this.M_CheckDateTime(time);
return HebrewCalendar.HebrewEra;
}
/// <summary>Calculates the leap month for a specified year and era.</summary>
/// <returns>A positive integer that indicates the leap month in the specified year and era. The return value is 7 if the <paramref name="year" /> and <paramref name="era" /> parameters specify a leap year, or 0 if the year is not a leap year.</returns>
/// <param name="year">A year.</param>
/// <param name="era">An era. Specify either <see cref="F:System.Globalization.HebrewCalendar.HebrewEra" /> or <see cref="F:System.Globalization.Calendar.CurrentEra" />.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="era" /> is not <see cref="F:System.Globalization.HebrewCalendar.HebrewEra" /> or <see cref="F:System.Globalization.Calendar.CurrentEra" />.-or-<paramref name="year" /> is less than the Hebrew calendar year 5343 or greater than the Hebrew calendar year 5999.</exception>
// Token: 0x0600136E RID: 4974 RVA: 0x0004B928 File Offset: 0x00049B28
public override int GetLeapMonth(int year, int era)
{
return (!this.IsLeapMonth(year, 7, era)) ? 0 : 7;
}
/// <summary>Returns the month in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 1 to 13 that represents the month in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="time" /> is less than <see cref="P:System.Globalization.HebrewCalendar.MinSupportedDateTime" /> or greater than <see cref="P:System.Globalization.HebrewCalendar.MaxSupportedDateTime" />.</exception>
// Token: 0x0600136F RID: 4975 RVA: 0x0004B940 File Offset: 0x00049B40
public override int GetMonth(DateTime time)
{
this.M_CheckDateTime(time);
int num = CCFixed.FromDateTime(time);
int num2;
int num3;
CCHebrewCalendar.my_from_fixed(out num2, out num3, num);
return this.M_Month(num2, num3);
}
/// <summary>Returns the number of months in the specified year in the specified era.</summary>
/// <returns>The number of months in the specified year in the specified era. The return value is either 12 in a common year, or 13 in a leap year.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. Specify either <see cref="F:System.Globalization.HebrewCalendar.HebrewEra" /> or <see cref="F:System.Globalization.Calendar.CurrentEra" />.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> or <paramref name="era" /> is outside the range supported by the current <see cref="T:System.Globalization.HebrewCalendar" /> object. </exception>
// Token: 0x06001370 RID: 4976 RVA: 0x0004B970 File Offset: 0x00049B70
public override int GetMonthsInYear(int year, int era)
{
this.M_CheckYE(year, ref era);
return CCHebrewCalendar.last_month_of_year(year);
}
/// <summary>Returns the year in the specified <see cref="T:System.DateTime" /> value.</summary>
/// <returns>An integer that represents the year in the specified <see cref="T:System.DateTime" /> value.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="time" /> is outside the range supported by the current <see cref="T:System.Globalization.HebrewCalendar" /> object. </exception>
// Token: 0x06001371 RID: 4977 RVA: 0x0004B984 File Offset: 0x00049B84
public override int GetYear(DateTime time)
{
this.M_CheckDateTime(time);
int num = CCFixed.FromDateTime(time);
return CCHebrewCalendar.year_from_fixed(num);
}
/// <summary>Determines whether the specified date in the specified era is a leap day.</summary>
/// <returns>true if the specified day is a leap day; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 13 that represents the month. </param>
/// <param name="day">An integer from 1 to 30 that represents the day. </param>
/// <param name="era">An integer that represents the era. Specify either <see cref="F:System.Globalization.HebrewCalendar.HebrewEra" /> or <see cref="F:System.Globalization.Calendar.CurrentEra" />.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" />, <paramref name="month" />, <paramref name="day" />, or <paramref name="era" /> is outside the range supported by this calendar. </exception>
// Token: 0x06001372 RID: 4978 RVA: 0x0004B9A8 File Offset: 0x00049BA8
public override bool IsLeapDay(int year, int month, int day, int era)
{
this.M_CheckYMDE(year, month, day, ref era);
return this.IsLeapYear(year) && (month == 7 || (month == 6 && day == 30));
}
/// <summary>Determines whether the specified month in the specified year in the specified era is a leap month.</summary>
/// <returns>true if the specified month is a leap month; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 13 that represents the month. </param>
/// <param name="era">An integer that represents the era. Specify either <see cref="F:System.Globalization.HebrewCalendar.HebrewEra" /> or <see cref="F:System.Globalization.Calendar.CurrentEra" />.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" />, <paramref name="month" />, or <paramref name="era" /> is outside the range supported by this calendar. </exception>
// Token: 0x06001373 RID: 4979 RVA: 0x0004B9E8 File Offset: 0x00049BE8
public override bool IsLeapMonth(int year, int month, int era)
{
this.M_CheckYME(year, month, ref era);
return this.IsLeapYear(year) && month == 7;
}
/// <summary>Determines whether the specified year in the specified era is a leap year.</summary>
/// <returns>true if the specified year is a leap year; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. Specify either <see cref="F:System.Globalization.HebrewCalendar.HebrewEra" /> or <see cref="F:System.Globalization.Calendar.CurrentEra" />.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> or <paramref name="era" /> is outside the range supported by this calendar. </exception>
// Token: 0x06001374 RID: 4980 RVA: 0x0004BA08 File Offset: 0x00049C08
public override bool IsLeapYear(int year, int era)
{
this.M_CheckYE(year, ref era);
return CCHebrewCalendar.is_leap_year(year);
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is set to the specified date and time in the specified era.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that is set to the specified date and time in the current era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 13 that represents the month. </param>
/// <param name="day">An integer from 1 to 30 that represents the day. </param>
/// <param name="hour">An integer from 0 to 23 that represents the hour. </param>
/// <param name="minute">An integer from 0 to 59 that represents the minute. </param>
/// <param name="second">An integer from 0 to 59 that represents the second. </param>
/// <param name="millisecond">An integer from 0 to 999 that represents the millisecond. </param>
/// <param name="era">An integer that represents the era. Specify either <see cref="F:System.Globalization.HebrewCalendar.HebrewEra" /> or <see cref="F:System.Globalization.Calendar.CurrentEra" />.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" />, <paramref name="month" />, <paramref name="day" /> or <paramref name="era" /> is outside the range supported by the current <see cref="T:System.Globalization.HebrewCalendar" /> object.-or- <paramref name="hour" /> is less than 0 or greater than 23.-or- <paramref name="minute" /> is less than 0 or greater than 59.-or- <paramref name="second" /> is less than 0 or greater than 59.-or- <paramref name="millisecond" /> is less than 0 or greater than 999. </exception>
// Token: 0x06001375 RID: 4981 RVA: 0x0004BA1C File Offset: 0x00049C1C
public override DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era)
{
this.M_CheckYMDE(year, month, day, ref era);
base.M_CheckHMSM(hour, minute, second, millisecond);
int num = this.M_CCMonth(month, year);
int num2 = CCHebrewCalendar.fixed_from_dmy(day, num, year);
return CCFixed.ToDateTime(num2, hour, minute, second, (double)millisecond);
}
/// <summary>Converts the specified year to a 4-digit year by using the <see cref="P:System.Globalization.HebrewCalendar.TwoDigitYearMax" /> property to determine the appropriate century.</summary>
/// <returns>If the <paramref name="year" /> parameter is a 2-digit year, the return value is the corresponding 4-digit year. If the <paramref name="year" /> parameter is a 4-digit year, the return value is the unchanged <paramref name="year" /> parameter.</returns>
/// <param name="year">A 2-digit year from 0 through 99, or a 4-digit Hebrew calendar year from 5343 through 5999.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is less than 0.-or-<paramref name="year" /> is less than <see cref="P:System.Globalization.HebrewCalendar.MinSupportedDateTime" /> or greater than <see cref="P:System.Globalization.HebrewCalendar.MaxSupportedDateTime" />. </exception>
// Token: 0x06001376 RID: 4982 RVA: 0x0004BA64 File Offset: 0x00049C64
public override int ToFourDigitYear(int year)
{
base.M_ArgumentInRange("year", year, 0, this.M_MaxYear - 1);
int num = this.twoDigitYearMax % 100;
int num2 = this.twoDigitYearMax - num;
if (year >= 100)
{
return year;
}
if (year <= num)
{
return num2 + year;
}
return num2 + year - 100;
}
/// <summary>Gets the earliest date and time supported by the <see cref="T:System.Globalization.HebrewCalendar" /> type.</summary>
/// <returns>The earliest date and time supported by the <see cref="T:System.Globalization.HebrewCalendar" /> type, which is equivalent to the first moment of January, 1, 1583 C.E. in the Gregorian calendar.</returns>
// Token: 0x17000356 RID: 854
// (get) Token: 0x06001377 RID: 4983 RVA: 0x0004BAB4 File Offset: 0x00049CB4
public override DateTime MinSupportedDateTime
{
get
{
return HebrewCalendar.Min;
}
}
/// <summary>Gets the latest date and time supported by the <see cref="T:System.Globalization.HebrewCalendar" /> type.</summary>
/// <returns>The latest date and time supported by the <see cref="T:System.Globalization.HebrewCalendar" /> type, which is equivalent to the last moment of September, 29, 2239 C.E. in the Gregorian calendar.</returns>
// Token: 0x17000357 RID: 855
// (get) Token: 0x06001378 RID: 4984 RVA: 0x0004BABC File Offset: 0x00049CBC
public override DateTime MaxSupportedDateTime
{
get
{
return HebrewCalendar.Max;
}
}
// Token: 0x04000565 RID: 1381
internal const long M_MinTicks = 499147488000000000L;
// Token: 0x04000566 RID: 1382
internal const long M_MaxTicks = 706783967999999999L;
// Token: 0x04000567 RID: 1383
internal const int M_MinYear = 5343;
/// <summary>Represents the current era. This field is constant.</summary>
// Token: 0x04000568 RID: 1384
public static readonly int HebrewEra = 1;
// Token: 0x04000569 RID: 1385
private static DateTime Min = new DateTime(1583, 1, 1, 0, 0, 0);
// Token: 0x0400056A RID: 1386
private static DateTime Max = new DateTime(2239, 9, 29, 11, 59, 59);
}
}
@@ -0,0 +1,505 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Represents the Hijri calendar.</summary>
// Token: 0x02000189 RID: 393
[ComVisible(true)]
[MonoTODO("Serialization format not compatible with .NET")]
[Serializable]
public class HijriCalendar : Calendar
{
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.HijriCalendar" /> class.</summary>
// Token: 0x06001379 RID: 4985 RVA: 0x0004BAC4 File Offset: 0x00049CC4
public HijriCalendar()
{
this.M_AbbrEraNames = new string[] { "A.H." };
this.M_EraNames = new string[] { "Anno Hegirae" };
if (this.twoDigitYearMax == 99)
{
this.twoDigitYearMax = 1451;
}
}
/// <summary>Gets the list of eras in the <see cref="T:System.Globalization.HijriCalendar" />.</summary>
/// <returns>An array of integers that represents the eras in the <see cref="T:System.Globalization.HijriCalendar" />.</returns>
// Token: 0x17000358 RID: 856
// (get) Token: 0x0600137B RID: 4987 RVA: 0x0004BB7C File Offset: 0x00049D7C
public override int[] Eras
{
get
{
return new int[] { HijriCalendar.HijriEra };
}
}
/// <summary>Gets or sets the number of days to add or subtract from the calendar to accommodate the variances in the start and the end of Ramadan and to accommodate the date difference between countries/regions.</summary>
/// <returns>An integer from -2 to 2 that represents the number of days to add or subtract from the calendar.</returns>
/// <exception cref="T:System.ArgumentOutOfRangeException">The property is being set to an invalid value. </exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.RegistryPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x17000359 RID: 857
// (get) Token: 0x0600137C RID: 4988 RVA: 0x0004BB8C File Offset: 0x00049D8C
// (set) Token: 0x0600137D RID: 4989 RVA: 0x0004BB94 File Offset: 0x00049D94
[MonoTODO("Not supported")]
public int HijriAdjustment
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
/// <summary>Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.</summary>
/// <returns>The last year of a 100-year range that can be represented by a 2-digit year.</returns>
/// <exception cref="T:System.InvalidOperationException">This calendar is read-only.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">The value in a set operation is less than 100 or greater than 9666.</exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.RegistryPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x1700035A RID: 858
// (get) Token: 0x0600137E RID: 4990 RVA: 0x0004BB9C File Offset: 0x00049D9C
// (set) Token: 0x0600137F RID: 4991 RVA: 0x0004BBA4 File Offset: 0x00049DA4
public override int TwoDigitYearMax
{
get
{
return this.twoDigitYearMax;
}
set
{
base.CheckReadOnly();
base.M_ArgumentInRange("value", value, 100, this.M_MaxYear);
this.twoDigitYearMax = value;
}
}
// Token: 0x1700035B RID: 859
// (get) Token: 0x06001380 RID: 4992 RVA: 0x0004BBD4 File Offset: 0x00049DD4
// (set) Token: 0x06001381 RID: 4993 RVA: 0x0004BBDC File Offset: 0x00049DDC
internal virtual int AddHijriDate
{
get
{
return this.M_AddHijriDate;
}
set
{
base.CheckReadOnly();
if (value < -3 && value > 3)
{
throw new ArgumentOutOfRangeException("AddHijriDate", "Value should be between -3 and 3.");
}
this.M_AddHijriDate = value;
}
}
// Token: 0x06001382 RID: 4994 RVA: 0x0004BC18 File Offset: 0x00049E18
internal void M_CheckFixedHijri(string param, int rdHijri)
{
if (rdHijri < HijriCalendar.M_MinFixed || rdHijri > HijriCalendar.M_MaxFixed - this.AddHijriDate)
{
StringWriter stringWriter = new StringWriter();
int num;
int num2;
int num3;
CCHijriCalendar.dmy_from_fixed(out num, out num2, out num3, HijriCalendar.M_MaxFixed - this.AddHijriDate);
if (this.AddHijriDate != 0)
{
stringWriter.Write("This HijriCalendar (AddHijriDate {0}) allows dates from 1. 1. 1 to {1}. {2}. {3}.", new object[] { this.AddHijriDate, num, num2, num3 });
}
else
{
stringWriter.Write("HijriCalendar allows dates from 1.1.1 to {0}.{1}.{2}.", num, num2, num3);
}
throw new ArgumentOutOfRangeException(param, stringWriter.ToString());
}
}
// Token: 0x06001383 RID: 4995 RVA: 0x0004BCD4 File Offset: 0x00049ED4
internal void M_CheckDateTime(DateTime time)
{
int num = CCFixed.FromDateTime(time) - this.AddHijriDate;
this.M_CheckFixedHijri("time", num);
}
// Token: 0x06001384 RID: 4996 RVA: 0x0004BCFC File Offset: 0x00049EFC
internal int M_FromDateTime(DateTime time)
{
return CCFixed.FromDateTime(time) - this.AddHijriDate;
}
// Token: 0x06001385 RID: 4997 RVA: 0x0004BD0C File Offset: 0x00049F0C
internal DateTime M_ToDateTime(int rd)
{
return CCFixed.ToDateTime(rd + this.AddHijriDate);
}
// Token: 0x06001386 RID: 4998 RVA: 0x0004BD1C File Offset: 0x00049F1C
internal DateTime M_ToDateTime(int date, int hour, int minute, int second, int milliseconds)
{
return CCFixed.ToDateTime(date + this.AddHijriDate, hour, minute, second, (double)milliseconds);
}
// Token: 0x06001387 RID: 4999 RVA: 0x0004BD34 File Offset: 0x00049F34
internal void M_CheckEra(ref int era)
{
if (era == 0)
{
era = HijriCalendar.HijriEra;
}
if (era != HijriCalendar.HijriEra)
{
throw new ArgumentException("Era value was not valid.");
}
}
// Token: 0x06001388 RID: 5000 RVA: 0x0004BD5C File Offset: 0x00049F5C
internal override void M_CheckYE(int year, ref int era)
{
this.M_CheckEra(ref era);
base.M_ArgumentInRange("year", year, 1, 9666);
}
// Token: 0x06001389 RID: 5001 RVA: 0x0004BD84 File Offset: 0x00049F84
internal void M_CheckYME(int year, int month, ref int era)
{
this.M_CheckYE(year, ref era);
if (month < 1 || month > 12)
{
throw new ArgumentOutOfRangeException("month", "Month must be between one and twelve.");
}
if (year == 9666)
{
int num = CCHijriCalendar.fixed_from_dmy(1, month, year);
this.M_CheckFixedHijri("month", num);
}
}
// Token: 0x0600138A RID: 5002 RVA: 0x0004BDD8 File Offset: 0x00049FD8
internal void M_CheckYMDE(int year, int month, int day, ref int era)
{
this.M_CheckYME(year, month, ref era);
base.M_ArgumentInRange("day", day, 1, this.GetDaysInMonth(year, month, HijriCalendar.HijriEra));
if (year == 9666)
{
int num = CCHijriCalendar.fixed_from_dmy(day, month, year);
this.M_CheckFixedHijri("day", num);
}
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of months away from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of months to the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to add months to. </param>
/// <param name="months">The number of months to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" />.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="months" /> is less than -120000.-or- <paramref name="months" /> is greater than 120000. </exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.RegistryPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="\" />
/// </PermissionSet>
// Token: 0x0600138B RID: 5003 RVA: 0x0004BE2C File Offset: 0x0004A02C
public override DateTime AddMonths(DateTime time, int months)
{
int num = this.M_FromDateTime(time);
int num2;
int num3;
int num4;
CCHijriCalendar.dmy_from_fixed(out num2, out num3, out num4, num);
num3 += months;
num4 += CCMath.div_mod(out num3, num3, 12);
num = CCHijriCalendar.fixed_from_dmy(num2, num3, num4);
this.M_CheckFixedHijri("time", num);
return this.M_ToDateTime(num).Add(time.TimeOfDay);
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of years away from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of years to the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to add years to. </param>
/// <param name="years">The number of years to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range. </exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.RegistryPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="\" />
/// </PermissionSet>
// Token: 0x0600138C RID: 5004 RVA: 0x0004BE8C File Offset: 0x0004A08C
public override DateTime AddYears(DateTime time, int years)
{
int num = this.M_FromDateTime(time);
int num2;
int num3;
int num4;
CCHijriCalendar.dmy_from_fixed(out num2, out num3, out num4, num);
num4 += years;
num = CCHijriCalendar.fixed_from_dmy(num2, num3, num4);
this.M_CheckFixedHijri("time", num);
return this.M_ToDateTime(num).Add(time.TimeOfDay);
}
/// <summary>Returns the day of the month in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 1 to 30 that represents the day of the month in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.RegistryPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="\" />
/// </PermissionSet>
// Token: 0x0600138D RID: 5005 RVA: 0x0004BEE0 File Offset: 0x0004A0E0
public override int GetDayOfMonth(DateTime time)
{
int num = this.M_FromDateTime(time);
this.M_CheckFixedHijri("time", num);
return CCHijriCalendar.day_from_fixed(num);
}
/// <summary>Returns the day of the week in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>A <see cref="T:System.DayOfWeek" /> value that represents the day of the week in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x0600138E RID: 5006 RVA: 0x0004BF08 File Offset: 0x0004A108
public override DayOfWeek GetDayOfWeek(DateTime time)
{
int num = this.M_FromDateTime(time);
this.M_CheckFixedHijri("time", num);
return CCFixed.day_of_week(num);
}
/// <summary>Returns the day of the year in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 1 to 355 that represents the day of the year in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.RegistryPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="\" />
/// </PermissionSet>
// Token: 0x0600138F RID: 5007 RVA: 0x0004BF30 File Offset: 0x0004A130
public override int GetDayOfYear(DateTime time)
{
int num = this.M_FromDateTime(time);
this.M_CheckFixedHijri("time", num);
int num2 = CCHijriCalendar.year_from_fixed(num);
int num3 = CCHijriCalendar.fixed_from_dmy(1, 1, num2);
return num - num3 + 1;
}
/// <summary>Returns the number of days in the specified month of the specified year and era.</summary>
/// <returns>The number of days in the specified month in the specified year in the specified era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="era" /> is outside the range supported by this calendar. -or- <paramref name="year" /> is outside the range supported by this calendar.-or- <paramref name="month" /> is outside the range supported by this calendar. </exception>
// Token: 0x06001390 RID: 5008 RVA: 0x0004BF68 File Offset: 0x0004A168
public override int GetDaysInMonth(int year, int month, int era)
{
this.M_CheckYME(year, month, ref era);
int num = CCHijriCalendar.fixed_from_dmy(1, month, year);
int num2 = CCHijriCalendar.fixed_from_dmy(1, month + 1, year);
return num2 - num;
}
/// <summary>Returns the number of days in the specified year and era.</summary>
/// <returns>The number of days in the specified year and era. The number of days is 354 in a common year or 355 in a leap year.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> or <paramref name="era" /> is outside the range supported by this calendar. </exception>
// Token: 0x06001391 RID: 5009 RVA: 0x0004BF98 File Offset: 0x0004A198
public override int GetDaysInYear(int year, int era)
{
this.M_CheckYE(year, ref era);
int num = CCHijriCalendar.fixed_from_dmy(1, 1, year);
int num2 = CCHijriCalendar.fixed_from_dmy(1, 1, year + 1);
return num2 - num;
}
/// <summary>Returns the era in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer that represents the era in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x06001392 RID: 5010 RVA: 0x0004BFC8 File Offset: 0x0004A1C8
public override int GetEra(DateTime time)
{
this.M_CheckDateTime(time);
return HijriCalendar.HijriEra;
}
/// <summary>Calculates the leap month for a specified year and era.</summary>
/// <returns>Always 0 because the <see cref="T:System.Globalization.HijriCalendar" /> type does not support the notion of a leap month.</returns>
/// <param name="year">A year.</param>
/// <param name="era">An era. Specify <see cref="F:System.Globalization.Calendar.CurrentEra" /> or <see cref="F:System.Globalization.HijriCalendar.HijriEra" />.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is less than the Hijri calendar year 1 or greater than the year 9666.-or-<paramref name="era" /> is not <see cref="F:System.Globalization.Calendar.CurrentEra" /> or <see cref="F:System.Globalization.HijriCalendar.HijriEra" />.</exception>
// Token: 0x06001393 RID: 5011 RVA: 0x0004BFD8 File Offset: 0x0004A1D8
[ComVisible(false)]
public override int GetLeapMonth(int year, int era)
{
return 0;
}
/// <summary>Returns the month in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 1 to 12 that represents the month in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.RegistryPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="\" />
/// </PermissionSet>
// Token: 0x06001394 RID: 5012 RVA: 0x0004BFDC File Offset: 0x0004A1DC
public override int GetMonth(DateTime time)
{
int num = this.M_FromDateTime(time);
this.M_CheckFixedHijri("time", num);
return CCHijriCalendar.month_from_fixed(num);
}
/// <summary>Returns the number of months in the specified year and era.</summary>
/// <returns>The number of months in the specified year and era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="era" /> is outside the range supported by this calendar. -or- <paramref name="year" /> is outside the range supported by this calendar. </exception>
// Token: 0x06001395 RID: 5013 RVA: 0x0004C004 File Offset: 0x0004A204
public override int GetMonthsInYear(int year, int era)
{
this.M_CheckYE(year, ref era);
return 12;
}
/// <summary>Returns the year in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer that represents the year in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.RegistryPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="\" />
/// </PermissionSet>
// Token: 0x06001396 RID: 5014 RVA: 0x0004C014 File Offset: 0x0004A214
public override int GetYear(DateTime time)
{
int num = this.M_FromDateTime(time);
this.M_CheckFixedHijri("time", num);
return CCHijriCalendar.year_from_fixed(num);
}
/// <summary>Determines whether the specified date is a leap day.</summary>
/// <returns>true if the specified day is a leap day; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="day">An integer from 1 to 30 that represents the day. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="era" /> is outside the range supported by this calendar. -or- <paramref name="year" /> is outside the range supported by this calendar.-or- <paramref name="month" /> is outside the range supported by this calendar.-or- <paramref name="day" /> is outside the range supported by this calendar. </exception>
// Token: 0x06001397 RID: 5015 RVA: 0x0004C03C File Offset: 0x0004A23C
public override bool IsLeapDay(int year, int month, int day, int era)
{
this.M_CheckYMDE(year, month, day, ref era);
return this.IsLeapYear(year) && month == 12 && day == 30;
}
/// <summary>Determines whether the specified month in the specified year and era is a leap month.</summary>
/// <returns>This method always returns false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="era" /> is outside the range supported by this calendar. -or- <paramref name="year" /> is outside the range supported by this calendar.-or- <paramref name="month" /> is outside the range supported by this calendar. </exception>
// Token: 0x06001398 RID: 5016 RVA: 0x0004C068 File Offset: 0x0004A268
public override bool IsLeapMonth(int year, int month, int era)
{
this.M_CheckYME(year, month, ref era);
return false;
}
/// <summary>Determines whether the specified year in the specified era is a leap year.</summary>
/// <returns>true if the specified year is a leap year; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="era" /> is outside the range supported by this calendar. -or- <paramref name="year" /> is outside the range supported by this calendar. </exception>
// Token: 0x06001399 RID: 5017 RVA: 0x0004C078 File Offset: 0x0004A278
public override bool IsLeapYear(int year, int era)
{
this.M_CheckYE(year, ref era);
return CCHijriCalendar.is_leap_year(year);
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is set to the specified date, time, and era.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that is set to the specified date and time in the current era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="day">An integer from 1 to 30 that represents the day. </param>
/// <param name="hour">An integer from 0 to 23 that represents the hour. </param>
/// <param name="minute">An integer from 0 to 59 that represents the minute. </param>
/// <param name="second">An integer from 0 to 59 that represents the second. </param>
/// <param name="millisecond">An integer from 0 to 999 that represents the millisecond. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="era" /> is outside the range supported by this calendar. -or- <paramref name="year" /> is outside the range supported by this calendar.-or- <paramref name="month" /> is outside the range supported by this calendar.-or- <paramref name="day" /> is outside the range supported by this calendar.-or- <paramref name="hour" /> is less than zero or greater than 23.-or- <paramref name="minute" /> is less than zero or greater than 59.-or- <paramref name="second" /> is less than zero or greater than 59.-or- <paramref name="millisecond" /> is less than zero or greater than 999. </exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.RegistryPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="\" />
/// </PermissionSet>
// Token: 0x0600139A RID: 5018 RVA: 0x0004C08C File Offset: 0x0004A28C
public override DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era)
{
this.M_CheckYMDE(year, month, day, ref era);
base.M_CheckHMSM(hour, minute, second, millisecond);
int num = CCHijriCalendar.fixed_from_dmy(day, month, year);
return this.M_ToDateTime(num, hour, minute, second, millisecond);
}
/// <summary>Converts the specified year to a four-digit year by using the <see cref="P:System.Globalization.HijriCalendar.TwoDigitYearMax" /> property to determine the appropriate century.</summary>
/// <returns>An integer that contains the four-digit representation of <paramref name="year" />.</returns>
/// <param name="year">A two-digit or four-digit integer that represents the year to convert. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by this calendar. </exception>
// Token: 0x0600139B RID: 5019 RVA: 0x0004C0CC File Offset: 0x0004A2CC
public override int ToFourDigitYear(int year)
{
return base.ToFourDigitYear(year);
}
/// <summary>Gets the earliest date and time supported by this calendar.</summary>
/// <returns>The earliest date and time supported by the <see cref="T:System.Globalization.HijriCalendar" /> type, which is equivalent to the first moment of July 18, 622 C.E. in the Gregorian calendar.</returns>
// Token: 0x1700035C RID: 860
// (get) Token: 0x0600139C RID: 5020 RVA: 0x0004C0D8 File Offset: 0x0004A2D8
[ComVisible(false)]
public override DateTime MinSupportedDateTime
{
get
{
return HijriCalendar.Min;
}
}
/// <summary>Gets the latest date and time supported by this calendar.</summary>
/// <returns>The latest date and time supported by the <see cref="T:System.Globalization.HijriCalendar" /> type, which is equivalent to the last moment of December 31, 9999 C.E. in the Gregorian calendar.</returns>
// Token: 0x1700035D RID: 861
// (get) Token: 0x0600139D RID: 5021 RVA: 0x0004C0E0 File Offset: 0x0004A2E0
[ComVisible(false)]
public override DateTime MaxSupportedDateTime
{
get
{
return HijriCalendar.Max;
}
}
/// <summary>Represents the current era. This field is constant.</summary>
// Token: 0x0400056B RID: 1387
public static readonly int HijriEra = 1;
// Token: 0x0400056C RID: 1388
internal static readonly int M_MinFixed = CCHijriCalendar.fixed_from_dmy(1, 1, 1);
// Token: 0x0400056D RID: 1389
internal static readonly int M_MaxFixed = CCGregorianCalendar.fixed_from_dmy(31, 12, 9999);
// Token: 0x0400056E RID: 1390
internal int M_AddHijriDate;
// Token: 0x0400056F RID: 1391
private static DateTime Min = new DateTime(622, 7, 18, 0, 0, 0);
// Token: 0x04000570 RID: 1392
private static DateTime Max = new DateTime(9999, 12, 31, 11, 59, 59);
}
}
+407
View File
@@ -0,0 +1,407 @@
using System;
using System.Text;
namespace System.Globalization
{
/// <summary>Supports the use of non-ASCII characters for Internet domain names. This class cannot be inherited.</summary>
// Token: 0x0200018A RID: 394
public sealed class IdnMapping
{
/// <summary>Gets or sets a value indicating whether unassigned Unicode code points are used in operations performed by members of the current <see cref="T:System.Globalization.IdnMapping" /> object.</summary>
/// <returns>true if unassigned code points are used in operations; otherwise, false.</returns>
// Token: 0x1700035E RID: 862
// (get) Token: 0x0600139F RID: 5023 RVA: 0x0004C0FC File Offset: 0x0004A2FC
// (set) Token: 0x060013A0 RID: 5024 RVA: 0x0004C104 File Offset: 0x0004A304
public bool AllowUnassigned
{
get
{
return this.allow_unassigned;
}
set
{
this.allow_unassigned = value;
}
}
/// <summary>Gets or sets a value indicating whether standard or nonstandard naming conventions are used in operations performed by members of the current <see cref="T:System.Globalization.IdnMapping" /> object.</summary>
/// <returns>true if nonstandard naming conventions are used in operations; otherwise, false.</returns>
// Token: 0x1700035F RID: 863
// (get) Token: 0x060013A1 RID: 5025 RVA: 0x0004C110 File Offset: 0x0004A310
// (set) Token: 0x060013A2 RID: 5026 RVA: 0x0004C118 File Offset: 0x0004A318
public bool UseStd3AsciiRules
{
get
{
return this.use_std3;
}
set
{
this.use_std3 = value;
}
}
/// <summary>Indicates whether a specified object and this <see cref="T:System.Globalization.IdnMapping" /> object are equal.</summary>
/// <returns>true if the <paramref name="obj" /> parameter is derived from <see cref="T:System.Globalization.IdnMapping" /> and its <see cref="P:System.Globalization.IdnMapping.AllowUnassigned" /> and <see cref="P:System.Globalization.IdnMapping.UseStd3AsciiRules" /> properties are equal; otherwise, false. </returns>
/// <param name="obj">An object.</param>
// Token: 0x060013A3 RID: 5027 RVA: 0x0004C124 File Offset: 0x0004A324
public override bool Equals(object obj)
{
IdnMapping idnMapping = obj as IdnMapping;
return idnMapping != null && this.allow_unassigned == idnMapping.allow_unassigned && this.use_std3 == idnMapping.use_std3;
}
/// <summary>Returns a hash code for this <see cref="T:System.Globalization.IdnMapping" /> object.</summary>
/// <returns>One of four 32-bit signed constants derived from the properties of a <see cref="T:System.Globalization.IdnMapping" /> object. The return value has no special meaning and is not suitable for use in a hash code algorithm.</returns>
// Token: 0x060013A4 RID: 5028 RVA: 0x0004C160 File Offset: 0x0004A360
public override int GetHashCode()
{
return ((!this.allow_unassigned) ? 0 : 2) + ((!this.use_std3) ? 0 : 1);
}
/// <summary>Encodes a string of one or more domain name labels that consist of Unicode characters to a string of Unicode characters in the US-ASCII character range.</summary>
/// <returns>The equivalent of the string specified by the <paramref name="unicode" /> parameter, consisting of displayable Unicode characters in the US-ASCII character range (U+0020 to U+007E) and formatted according to the Internationalizing Domain Names in Applications (IDNA) standard.</returns>
/// <param name="unicode">An input string to convert, which consists of one or more domain name labels delimited with label separators.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="unicode" /> is null.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="unicode" /> is invalid based on the <see cref="P:System.Globalization.IdnMapping.AllowUnassigned" /> and <see cref="P:System.Globalization.IdnMapping.UseStd3AsciiRules" /> properties, and the IDNA standard.-or-A label contains one or more of the Unicode control characters from U+0001 through U+001F, or U+007F.</exception>
// Token: 0x060013A5 RID: 5029 RVA: 0x0004C188 File Offset: 0x0004A388
public string GetAscii(string unicode)
{
if (unicode == null)
{
throw new ArgumentNullException("unicode");
}
return this.GetAscii(unicode, 0, unicode.Length);
}
/// <summary>Encodes a substring of one or more domain name labels that consist of Unicode characters to a string of Unicode characters in the US-ASCII character range. </summary>
/// <returns>The equivalent of the substring specified by the <paramref name="unicode" /> and <paramref name="index" /> parameters, consisting of displayable Unicode characters in the US-ASCII character range (U+0020 to U+007E) and formatted according to the Internationalizing Domain Names in Applications (IDNA) standard.</returns>
/// <param name="unicode">An input string to convert, which consists of one or more domain name labels delimited with label separators.</param>
/// <param name="index">A zero-based offset into <paramref name="unicode" /> that specifies the start of the substring. The conversion operation continues to the end of <paramref name="unicode" />.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="unicode" /> is null.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="index" /> or <paramref name="count" /> is less than zero.-or-<paramref name="index" /> is greater than the length of <paramref name="unicode" />.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="unicode" /> is invalid based on the <see cref="P:System.Globalization.IdnMapping.AllowUnassigned" /> and <see cref="P:System.Globalization.IdnMapping.UseStd3AsciiRules" /> properties, and the IDNA standard.-or-A label contains one or more of the Unicode control characters from U+0001 through U+001F, or U+007F.</exception>
// Token: 0x060013A6 RID: 5030 RVA: 0x0004C1AC File Offset: 0x0004A3AC
public string GetAscii(string unicode, int index)
{
if (unicode == null)
{
throw new ArgumentNullException("unicode");
}
return this.GetAscii(unicode, index, unicode.Length - index);
}
/// <summary>Encodes a substring of one or more domain name labels that consist of Unicode characters to a string of Unicode characters in the US-ASCII character range. The string is formatted according to the Internationalizing Domain Names in Applications (IDNA) standard. </summary>
/// <returns>The equivalent of the substring specified by the <paramref name="unicode" />, <paramref name="index" />, and <paramref name="count" /> parameters, consisting of displayable Unicode characters in the US-ASCII character range (U+0020 to U+007E) and formatted according to the IDNA standard.</returns>
/// <param name="unicode">An input string to convert, which consists of one or more domain name labels delimited with label separators.</param>
/// <param name="index">A zero-based offset into <paramref name="unicode" /> that specifies the start of the substring.</param>
/// <param name="count">The number of characters to convert in the substring that starts at the position specified by <paramref name="unicode" /> and <paramref name="index" />. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="unicode" /> is null.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="index" /> or <paramref name="count" /> is less than zero.-or-<paramref name="index" /> is greater than the length of <paramref name="unicode" />.-or-<paramref name="index" /> is greater than the length of <paramref name="unicode" /> minus <paramref name="count" />.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="unicode" /> is invalid based on the <see cref="P:System.Globalization.IdnMapping.AllowUnassigned" /> and <see cref="P:System.Globalization.IdnMapping.UseStd3AsciiRules" /> properties, and the IDNA standard.-or-A label contains one or more of the Unicode control characters from U+0001 through U+001F, or U+007F.</exception>
// Token: 0x060013A7 RID: 5031 RVA: 0x0004C1D0 File Offset: 0x0004A3D0
public string GetAscii(string unicode, int index, int count)
{
if (unicode == null)
{
throw new ArgumentNullException("unicode");
}
if (index < 0)
{
throw new ArgumentOutOfRangeException("index must be non-negative value");
}
if (count < 0 || index + count > unicode.Length)
{
throw new ArgumentOutOfRangeException("index + count must point inside the argument unicode string");
}
return this.Convert(unicode, index, count, true);
}
// Token: 0x060013A8 RID: 5032 RVA: 0x0004C22C File Offset: 0x0004A42C
private string Convert(string input, int index, int count, bool toAscii)
{
string text = input.Substring(index, count);
for (int i = 0; i < text.Length; i++)
{
if (text[i] >= '\u0080')
{
text = text.ToLower(CultureInfo.InvariantCulture);
break;
}
}
string[] array = text.Split(new char[] { '.', '。', '', '。' });
int num = 0;
for (int j = 0; j < array.Length; j++)
{
if (array[j].Length != 0 || j + 1 != array.Length)
{
if (toAscii)
{
array[j] = this.ToAscii(array[j], num);
}
else
{
array[j] = this.ToUnicode(array[j], num);
}
}
num += array[j].Length;
}
return string.Join(".", array);
}
// Token: 0x060013A9 RID: 5033 RVA: 0x0004C310 File Offset: 0x0004A510
private string ToAscii(string s, int offset)
{
for (int i = 0; i < s.Length; i++)
{
if (s[i] < ' ' || s[i] == '\u007f')
{
throw new ArgumentException(string.Format("Not allowed character was found, at {0}", offset + i));
}
if (s[i] >= '\u0080')
{
s = this.NamePrep(s, offset);
break;
}
}
if (this.use_std3)
{
this.VerifyStd3AsciiRules(s, offset);
}
int j = 0;
while (j < s.Length)
{
if (s[j] >= '\u0080')
{
if (s.StartsWith("xn--", StringComparison.OrdinalIgnoreCase))
{
throw new ArgumentException(string.Format("The input string must not start with ACE (xn--), at {0}", offset + j));
}
s = this.puny.Encode(s, offset);
s = "xn--" + s;
break;
}
else
{
j++;
}
}
this.VerifyLength(s, offset);
return s;
}
// Token: 0x060013AA RID: 5034 RVA: 0x0004C418 File Offset: 0x0004A618
private void VerifyLength(string s, int offset)
{
if (s.Length == 0)
{
throw new ArgumentException(string.Format("A label in the input string resulted in an invalid zero-length string, at {0}", offset));
}
if (s.Length > 63)
{
throw new ArgumentException(string.Format("A label in the input string exceeded the length in ASCII representation, at {0}", offset));
}
}
// Token: 0x060013AB RID: 5035 RVA: 0x0004C46C File Offset: 0x0004A66C
private string NamePrep(string s, int offset)
{
s = s.Normalize(NormalizationForm.FormKC);
this.VerifyProhibitedCharacters(s, offset);
if (!this.allow_unassigned)
{
for (int i = 0; i < s.Length; i++)
{
if (char.GetUnicodeCategory(s, i) == UnicodeCategory.OtherNotAssigned)
{
throw new ArgumentException(string.Format("Use of unassigned Unicode characer is prohibited in this IdnMapping, at {0}", offset + i));
}
}
}
return s;
}
// Token: 0x060013AC RID: 5036 RVA: 0x0004C4D4 File Offset: 0x0004A6D4
private void VerifyProhibitedCharacters(string s, int offset)
{
int i = 0;
while (i < s.Length)
{
switch (char.GetUnicodeCategory(s, i))
{
case UnicodeCategory.SpaceSeparator:
if (s[i] >= '\u0080')
{
goto IL_164;
}
break;
case UnicodeCategory.LineSeparator:
case UnicodeCategory.ParagraphSeparator:
case UnicodeCategory.Format:
goto IL_80;
case UnicodeCategory.Control:
if (s[i] == '\0' || s[i] >= '\u0080')
{
goto IL_164;
}
break;
case UnicodeCategory.Surrogate:
case UnicodeCategory.PrivateUse:
goto IL_164;
default:
goto IL_80;
}
IL_17C:
i++;
continue;
IL_80:
char c = s[i];
if (('\ufddf' > c || c > '\ufdef') && ((c & '\uffff') != '\ufffe' && ('\ufff9' > c || c > '\ufffd')) && ('⿰' > c || c > '⿻') && ('\u202a' > c || c > '\u202e') && ('\u206a' > c || c > '\u206f'))
{
char c2 = c;
if (c2 != '\u0340' && c2 != '\u0341' && c2 != '\u200e' && c2 != '\u200f' && c2 != '\u2028' && c2 != '\u2029')
{
goto IL_17C;
}
}
IL_164:
throw new ArgumentException(string.Format("Not allowed character was in the input string, at {0}", offset + i));
}
}
// Token: 0x060013AD RID: 5037 RVA: 0x0004C670 File Offset: 0x0004A870
private void VerifyStd3AsciiRules(string s, int offset)
{
if (s.Length > 0 && s[0] == '-')
{
throw new ArgumentException(string.Format("'-' is not allowed at head of a sequence in STD3 mode, found at {0}", offset));
}
if (s.Length > 0 && s[s.Length - 1] == '-')
{
throw new ArgumentException(string.Format("'-' is not allowed at tail of a sequence in STD3 mode, found at {0}", offset + s.Length - 1));
}
for (int i = 0; i < s.Length; i++)
{
char c = s[i];
if (c != '-')
{
if (c <= '/' || (':' <= c && c <= '@') || ('[' <= c && c <= '`') || ('{' <= c && c <= '\u007f'))
{
throw new ArgumentException(string.Format("Not allowed character in STD3 mode, found at {0}", offset + i));
}
}
}
}
/// <summary>Decodes a string of one or more domain name labels encoded according to the Internationalizing Domain Names in Applications (IDNA) standard to a string of Unicode characters. </summary>
/// <returns>The Unicode equivalent of the IDNA substring specified by the <paramref name="ascii" /> parameter.</returns>
/// <param name="ascii">One or more labels in the US-ASCII character range (U+0020 to U+007E) encoded according to the IDNA standard. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="ascii" /> is null.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="ascii" /> is invalid based on the <see cref="P:System.Globalization.IdnMapping.AllowUnassigned" /> and <see cref="P:System.Globalization.IdnMapping.UseStd3AsciiRules" /> properties, and the IDNA standard.</exception>
// Token: 0x060013AE RID: 5038 RVA: 0x0004C76C File Offset: 0x0004A96C
public string GetUnicode(string ascii)
{
if (ascii == null)
{
throw new ArgumentNullException("ascii");
}
return this.GetUnicode(ascii, 0, ascii.Length);
}
/// <summary>Decodes a substring of one or more domain name labels encoded according to the Internationalizing Domain Names in Applications (IDNA) standard to a string of Unicode characters. </summary>
/// <returns>The Unicode equivalent of the IDNA substring specified by the <paramref name="ascii" /> and <paramref name="index" /> parameters.</returns>
/// <param name="ascii">One or more labels in the US-ASCII character range (U+0020 to U+007E) encoded according to the IDNA standard. </param>
/// <param name="index">A zero-based offset into <paramref name="ascii" /> that specifies the start of the substring. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="ascii" /> is null.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="index" /> is less than zero.-or-<paramref name="index" /> is greater than the length of <paramref name="ascii" />.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="ascii" /> is invalid based on the <see cref="P:System.Globalization.IdnMapping.AllowUnassigned" /> and <see cref="P:System.Globalization.IdnMapping.UseStd3AsciiRules" /> properties, and the IDNA standard.</exception>
// Token: 0x060013AF RID: 5039 RVA: 0x0004C790 File Offset: 0x0004A990
public string GetUnicode(string ascii, int index)
{
if (ascii == null)
{
throw new ArgumentNullException("ascii");
}
return this.GetUnicode(ascii, index, ascii.Length - index);
}
/// <summary>Decodes a substring of one or more domain name labels encoded according to the Internationalizing Domain Names in Applications (IDNA) standard to a string of Unicode characters. </summary>
/// <returns>The Unicode equivalent of the IDNA substring specified by the <paramref name="ascii" />, <paramref name="index" />, and <paramref name="count" /> parameters.</returns>
/// <param name="ascii">One or more labels in the US-ASCII character range (U+0020 to U+007E) encoded according to the IDNA standard. </param>
/// <param name="index">A zero-based offset into <paramref name="ascii" /> that specifies the start of the substring. </param>
/// <param name="count">The number of characters to convert in the substring that starts at the position specified by <paramref name="ascii" /> and <paramref name="index" />. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="ascii" /> is null.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="index" /> or <paramref name="count" /> is less than zero.-or-<paramref name="index" /> is greater than the length of <paramref name="ascii" />.-or-<paramref name="index" /> is greater than the length of <paramref name="ascii" /> minus <paramref name="count" />.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="ascii" /> is invalid based on the <see cref="P:System.Globalization.IdnMapping.AllowUnassigned" /> and <see cref="P:System.Globalization.IdnMapping.UseStd3AsciiRules" /> properties, and the IDNA standard.</exception>
// Token: 0x060013B0 RID: 5040 RVA: 0x0004C7B4 File Offset: 0x0004A9B4
public string GetUnicode(string ascii, int index, int count)
{
if (ascii == null)
{
throw new ArgumentNullException("ascii");
}
if (index < 0)
{
throw new ArgumentOutOfRangeException("index must be non-negative value");
}
if (count < 0 || index + count > ascii.Length)
{
throw new ArgumentOutOfRangeException("index + count must point inside the argument ascii string");
}
return this.Convert(ascii, index, count, false);
}
// Token: 0x060013B1 RID: 5041 RVA: 0x0004C810 File Offset: 0x0004AA10
private string ToUnicode(string s, int offset)
{
for (int i = 0; i < s.Length; i++)
{
if (s[i] >= '\u0080')
{
s = this.NamePrep(s, offset);
break;
}
}
if (!s.StartsWith("xn--", StringComparison.OrdinalIgnoreCase))
{
return s;
}
s = s.ToLower(CultureInfo.InvariantCulture);
string text = s;
s = s.Substring(4);
s = this.puny.Decode(s, offset);
string text2 = s;
s = this.ToAscii(s, offset);
if (string.Compare(text, s, StringComparison.OrdinalIgnoreCase) != 0)
{
throw new ArgumentException(string.Format("ToUnicode() failed at verifying the result, at label part from {0}", offset));
}
return text2;
}
// Token: 0x04000571 RID: 1393
private bool allow_unassigned;
// Token: 0x04000572 RID: 1394
private bool use_std3;
// Token: 0x04000573 RID: 1395
private Punycode puny = new Punycode();
}
}
@@ -0,0 +1,392 @@
using System;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Represents the Japanese calendar.</summary>
// Token: 0x0200018D RID: 397
[ComVisible(true)]
[MonoTODO("Serialization format not compatible with .NET")]
[Serializable]
public class JapaneseCalendar : Calendar
{
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.JapaneseCalendar" /> class.</summary>
// Token: 0x060013B9 RID: 5049 RVA: 0x0004CDC8 File Offset: 0x0004AFC8
public JapaneseCalendar()
{
this.M_AbbrEraNames = new string[] { "M", "T", "S", "H" };
this.M_EraNames = new string[] { "Meiji", "Taisho", "Showa", "Heisei" };
}
// Token: 0x060013BA RID: 5050 RVA: 0x0004CE34 File Offset: 0x0004B034
static JapaneseCalendar()
{
JapaneseCalendar.M_EraHandler.appendEra(1, CCGregorianCalendar.fixed_from_dmy(8, 9, 1868), CCGregorianCalendar.fixed_from_dmy(29, 7, 1912));
JapaneseCalendar.M_EraHandler.appendEra(2, CCGregorianCalendar.fixed_from_dmy(30, 7, 1912), CCGregorianCalendar.fixed_from_dmy(24, 12, 1926));
JapaneseCalendar.M_EraHandler.appendEra(3, CCGregorianCalendar.fixed_from_dmy(25, 12, 1926), CCGregorianCalendar.fixed_from_dmy(7, 1, 1989));
JapaneseCalendar.M_EraHandler.appendEra(4, CCGregorianCalendar.fixed_from_dmy(8, 1, 1989));
}
/// <summary>Gets the list of eras in the <see cref="T:System.Globalization.JapaneseCalendar" />.</summary>
/// <returns>An array of integers that represents the eras in the <see cref="T:System.Globalization.JapaneseCalendar" />.</returns>
// Token: 0x17000360 RID: 864
// (get) Token: 0x060013BB RID: 5051 RVA: 0x0004CF00 File Offset: 0x0004B100
public override int[] Eras
{
get
{
return (int[])JapaneseCalendar.M_EraHandler.Eras.Clone();
}
}
/// <summary>Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.</summary>
/// <returns>The last year of a 100-year range that can be represented by a 2-digit year.</returns>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.RegistryPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x17000361 RID: 865
// (get) Token: 0x060013BC RID: 5052 RVA: 0x0004CF18 File Offset: 0x0004B118
// (set) Token: 0x060013BD RID: 5053 RVA: 0x0004CF20 File Offset: 0x0004B120
public override int TwoDigitYearMax
{
get
{
return this.twoDigitYearMax;
}
set
{
base.CheckReadOnly();
base.M_ArgumentInRange("value", value, 100, this.M_MaxYear);
this.twoDigitYearMax = value;
}
}
// Token: 0x060013BE RID: 5054 RVA: 0x0004CF50 File Offset: 0x0004B150
internal void M_CheckDateTime(DateTime time)
{
JapaneseCalendar.M_EraHandler.CheckDateTime(time);
}
// Token: 0x060013BF RID: 5055 RVA: 0x0004CF60 File Offset: 0x0004B160
internal void M_CheckEra(ref int era)
{
if (era == 0)
{
era = 4;
}
if (!JapaneseCalendar.M_EraHandler.ValidEra(era))
{
throw new ArgumentException("Era value was not valid.");
}
}
// Token: 0x060013C0 RID: 5056 RVA: 0x0004CF94 File Offset: 0x0004B194
internal int M_CheckYEG(int year, ref int era)
{
this.M_CheckEra(ref era);
return JapaneseCalendar.M_EraHandler.GregorianYear(year, era);
}
// Token: 0x060013C1 RID: 5057 RVA: 0x0004CFAC File Offset: 0x0004B1AC
internal override void M_CheckYE(int year, ref int era)
{
this.M_CheckYEG(year, ref era);
}
// Token: 0x060013C2 RID: 5058 RVA: 0x0004CFB8 File Offset: 0x0004B1B8
internal int M_CheckYMEG(int year, int month, ref int era)
{
int num = this.M_CheckYEG(year, ref era);
if (month < 1 || month > 12)
{
throw new ArgumentOutOfRangeException("month", "Month must be between one and twelve.");
}
return num;
}
// Token: 0x060013C3 RID: 5059 RVA: 0x0004CFF0 File Offset: 0x0004B1F0
internal int M_CheckYMDEG(int year, int month, int day, ref int era)
{
int num = this.M_CheckYMEG(year, month, ref era);
base.M_ArgumentInRange("day", day, 1, this.GetDaysInMonth(year, month, era));
return num;
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of months away from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of months to the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add months. </param>
/// <param name="months">The number of months to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="months" /> is less than -120000.-or- <paramref name="months" /> is greater than 120000. </exception>
// Token: 0x060013C4 RID: 5060 RVA: 0x0004D024 File Offset: 0x0004B224
public override DateTime AddMonths(DateTime time, int months)
{
DateTime dateTime = CCGregorianCalendar.AddMonths(time, months);
this.M_CheckDateTime(dateTime);
return dateTime;
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of years away from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of years to the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add years. </param>
/// <param name="years">The number of years to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="time" /> is outside the supported range of the <see cref="T:System.Globalization.JapaneseCalendar" /> type.-or-<paramref name="years" /> is less than -10,000 or greater than 10,000. </exception>
// Token: 0x060013C5 RID: 5061 RVA: 0x0004D044 File Offset: 0x0004B244
public override DateTime AddYears(DateTime time, int years)
{
DateTime dateTime = CCGregorianCalendar.AddYears(time, years);
this.M_CheckDateTime(dateTime);
return dateTime;
}
/// <summary>Returns the day of the month in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 1 to 31 that represents the day of the month in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060013C6 RID: 5062 RVA: 0x0004D064 File Offset: 0x0004B264
public override int GetDayOfMonth(DateTime time)
{
this.M_CheckDateTime(time);
return CCGregorianCalendar.GetDayOfMonth(time);
}
/// <summary>Returns the day of the week in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>A <see cref="T:System.DayOfWeek" /> value that represents the day of the week in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060013C7 RID: 5063 RVA: 0x0004D074 File Offset: 0x0004B274
public override DayOfWeek GetDayOfWeek(DateTime time)
{
this.M_CheckDateTime(time);
int num = CCFixed.FromDateTime(time);
return CCFixed.day_of_week(num);
}
/// <summary>Returns the day of the year in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 1 to 366 that represents the day of the year in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060013C8 RID: 5064 RVA: 0x0004D098 File Offset: 0x0004B298
public override int GetDayOfYear(DateTime time)
{
this.M_CheckDateTime(time);
return CCGregorianCalendar.GetDayOfYear(time);
}
/// <summary>Returns the number of days in the specified month in the specified year in the specified era.</summary>
/// <returns>The number of days in the specified month in the specified year in the specified era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060013C9 RID: 5065 RVA: 0x0004D0A8 File Offset: 0x0004B2A8
public override int GetDaysInMonth(int year, int month, int era)
{
int num = this.M_CheckYMEG(year, month, ref era);
return CCGregorianCalendar.GetDaysInMonth(num, month);
}
/// <summary>Returns the number of days in the specified year in the specified era.</summary>
/// <returns>The number of days in the specified year in the specified era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060013CA RID: 5066 RVA: 0x0004D0C8 File Offset: 0x0004B2C8
public override int GetDaysInYear(int year, int era)
{
int num = this.M_CheckYEG(year, ref era);
return CCGregorianCalendar.GetDaysInYear(num);
}
/// <summary>Returns the era in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer that represents the era in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range. </exception>
// Token: 0x060013CB RID: 5067 RVA: 0x0004D0E8 File Offset: 0x0004B2E8
public override int GetEra(DateTime time)
{
int num = CCFixed.FromDateTime(time);
int num2;
JapaneseCalendar.M_EraHandler.EraYear(out num2, num);
return num2;
}
/// <summary>Calculates the leap month for a specified year and era.</summary>
/// <returns>The return value is always 0 because the <see cref="T:System.Globalization.JapaneseCalendar" /> type does not support the notion of a leap month.</returns>
/// <param name="year">A year.</param>
/// <param name="era">An era.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> or <paramref name="era" /> is outside the range supported by the <see cref="T:System.Globalization.JapaneseCalendar" /> type.</exception>
// Token: 0x060013CC RID: 5068 RVA: 0x0004D10C File Offset: 0x0004B30C
[ComVisible(false)]
public override int GetLeapMonth(int year, int era)
{
return 0;
}
/// <summary>Returns the month in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 1 to 12 that represents the month in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060013CD RID: 5069 RVA: 0x0004D110 File Offset: 0x0004B310
public override int GetMonth(DateTime time)
{
this.M_CheckDateTime(time);
return CCGregorianCalendar.GetMonth(time);
}
/// <summary>Returns the number of months in the specified year in the specified era.</summary>
/// <returns>The return value is always 12.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060013CE RID: 5070 RVA: 0x0004D120 File Offset: 0x0004B320
public override int GetMonthsInYear(int year, int era)
{
this.M_CheckYE(year, ref era);
return 12;
}
/// <summary>Returns the week of the year that includes the date in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>A 1-based integer that represents the week of the year that includes the date in the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
/// <param name="rule">One of the <see cref="T:System.Globalization.CalendarWeekRule" /> values that defines a calendar week. </param>
/// <param name="firstDayOfWeek">One of the <see cref="T:System.DayOfWeek" /> values that represents the first day of the week. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="time" /> or <paramref name="firstDayOfWeek" /> is outside the range supported by the calendar.-or- <paramref name="rule" /> is not a valid <see cref="T:System.Globalization.CalendarWeekRule" /> value. </exception>
// Token: 0x060013CF RID: 5071 RVA: 0x0004D130 File Offset: 0x0004B330
[ComVisible(false)]
public override int GetWeekOfYear(DateTime time, CalendarWeekRule rule, DayOfWeek firstDayOfWeek)
{
return base.GetWeekOfYear(time, rule, firstDayOfWeek);
}
/// <summary>Returns the year in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer that represents the year in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060013D0 RID: 5072 RVA: 0x0004D13C File Offset: 0x0004B33C
public override int GetYear(DateTime time)
{
int num = CCFixed.FromDateTime(time);
int num2;
return JapaneseCalendar.M_EraHandler.EraYear(out num2, num);
}
/// <summary>Determines whether the specified date in the specified era is a leap day.</summary>
/// <returns>true, if the specified day is a leap day; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="day">An integer from 1 to 31 that represents the day. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="day" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060013D1 RID: 5073 RVA: 0x0004D160 File Offset: 0x0004B360
public override bool IsLeapDay(int year, int month, int day, int era)
{
int num = this.M_CheckYMDEG(year, month, day, ref era);
return CCGregorianCalendar.IsLeapDay(num, month, day);
}
/// <summary>Determines whether the specified month in the specified year in the specified era is a leap month.</summary>
/// <returns>This method always returns false, unless overridden by a derived class.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060013D2 RID: 5074 RVA: 0x0004D184 File Offset: 0x0004B384
public override bool IsLeapMonth(int year, int month, int era)
{
this.M_CheckYMEG(year, month, ref era);
return false;
}
/// <summary>Determines whether the specified year in the specified era is a leap year.</summary>
/// <returns>true, if the specified year is a leap year; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060013D3 RID: 5075 RVA: 0x0004D194 File Offset: 0x0004B394
public override bool IsLeapYear(int year, int era)
{
int num = this.M_CheckYEG(year, ref era);
return CCGregorianCalendar.is_leap_year(num);
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is set to the specified date and time in the specified era.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that is set to the specified date and time in the current era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="day">An integer from 1 to 31 that represents the day. </param>
/// <param name="hour">An integer from 0 to 23 that represents the hour. </param>
/// <param name="minute">An integer from 0 to 59 that represents the minute. </param>
/// <param name="second">An integer from 0 to 59 that represents the second. </param>
/// <param name="millisecond">An integer from 0 to 999 that represents the millisecond. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="day" /> is outside the range supported by the calendar.-or- <paramref name="hour" /> is less than zero or greater than 23.-or- <paramref name="minute" /> is less than zero or greater than 59.-or- <paramref name="second" /> is less than zero or greater than 59.-or- <paramref name="millisecond" /> is less than zero or greater than 999.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060013D4 RID: 5076 RVA: 0x0004D1B4 File Offset: 0x0004B3B4
public override DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era)
{
int num = this.M_CheckYMDEG(year, month, day, ref era);
base.M_CheckHMSM(hour, minute, second, millisecond);
return CCGregorianCalendar.ToDateTime(num, month, day, hour, minute, second, millisecond);
}
/// <summary>Converts the specified year to a four-digit year by using the <see cref="P:System.Globalization.JapaneseCalendar.TwoDigitYearMax" /> property to determine the appropriate century.</summary>
/// <returns>An integer that contains the four-digit representation of <paramref name="year" />.</returns>
/// <param name="year">An integer (usually two digits) that represents the year to convert. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar. </exception>
// Token: 0x060013D5 RID: 5077 RVA: 0x0004D1EC File Offset: 0x0004B3EC
public override int ToFourDigitYear(int year)
{
if (year < 0)
{
throw new ArgumentOutOfRangeException("year", "Non-negative number required.");
}
int num = 0;
this.M_CheckYE(year, ref num);
return year;
}
/// <summary>Gets the earliest date and time supported by the current <see cref="T:System.Globalization.JapaneseCalendar" /> object.</summary>
/// <returns>The earliest date and time supported by the <see cref="T:System.Globalization.JapaneseCalendar" /> type, which is equivalent to the first moment of January 1, 1868 C.E. in the Gregorian calendar. </returns>
// Token: 0x17000362 RID: 866
// (get) Token: 0x060013D6 RID: 5078 RVA: 0x0004D21C File Offset: 0x0004B41C
[ComVisible(false)]
public override DateTime MinSupportedDateTime
{
get
{
return JapaneseCalendar.JapanMin;
}
}
/// <summary>Gets the latest date and time supported by the current <see cref="T:System.Globalization.JapaneseCalendar" /> object.</summary>
/// <returns>The latest date and time supported by the <see cref="T:System.Globalization.JapaneseCalendar" /> type, which is equivalent to the last moment of December 31, 9999 C.E. in the Gregorian calendar.</returns>
// Token: 0x17000363 RID: 867
// (get) Token: 0x060013D7 RID: 5079 RVA: 0x0004D224 File Offset: 0x0004B424
[ComVisible(false)]
public override DateTime MaxSupportedDateTime
{
get
{
return JapaneseCalendar.JapanMax;
}
}
// Token: 0x0400057C RID: 1404
internal static readonly CCGregorianEraHandler M_EraHandler = new CCGregorianEraHandler();
// Token: 0x0400057D RID: 1405
private static DateTime JapanMin = new DateTime(1868, 9, 8, 0, 0, 0);
// Token: 0x0400057E RID: 1406
private static DateTime JapanMax = new DateTime(9999, 12, 31, 11, 59, 59);
}
}
@@ -0,0 +1,96 @@
using System;
namespace System.Globalization
{
/// <summary>Represents time in divisions, such as months, days, and years. Years are calculated as for the Japanese calendar, while days and months are calculated using the lunisolar calendar.</summary>
// Token: 0x0200018E RID: 398
[Serializable]
public class JapaneseLunisolarCalendar : EastAsianLunisolarCalendar
{
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.JapaneseLunisolarCalendar" /> class. </summary>
// Token: 0x060013D8 RID: 5080 RVA: 0x0004D22C File Offset: 0x0004B42C
[MonoTODO]
public JapaneseLunisolarCalendar()
: base(JapaneseLunisolarCalendar.era_handler)
{
}
// Token: 0x060013D9 RID: 5081 RVA: 0x0004D23C File Offset: 0x0004B43C
static JapaneseLunisolarCalendar()
{
JapaneseLunisolarCalendar.era_handler.appendEra(3, CCGregorianCalendar.fixed_from_dmy(25, 12, 1926), CCGregorianCalendar.fixed_from_dmy(7, 1, 1989));
JapaneseLunisolarCalendar.era_handler.appendEra(4, CCGregorianCalendar.fixed_from_dmy(8, 1, 1989));
}
// Token: 0x17000364 RID: 868
// (get) Token: 0x060013DA RID: 5082 RVA: 0x0004D2BC File Offset: 0x0004B4BC
internal override int ActualCurrentEra
{
get
{
return 4;
}
}
/// <summary>Gets the eras that are relevant to the <see cref="T:System.Globalization.JapaneseLunisolarCalendar" /> object.</summary>
/// <returns>An array of 32-bit signed integers that specify the relevant eras.</returns>
// Token: 0x17000365 RID: 869
// (get) Token: 0x060013DB RID: 5083 RVA: 0x0004D2C0 File Offset: 0x0004B4C0
public override int[] Eras
{
get
{
return (int[])JapaneseLunisolarCalendar.era_handler.Eras.Clone();
}
}
/// <summary>Retrieves the era that corresponds to the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer that represents the era specified in the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060013DC RID: 5084 RVA: 0x0004D2D8 File Offset: 0x0004B4D8
public override int GetEra(DateTime time)
{
int num = CCFixed.FromDateTime(time);
int num2;
JapaneseLunisolarCalendar.era_handler.EraYear(out num2, num);
return num2;
}
/// <summary>Gets the minimum date and time supported by the <see cref="T:System.Globalization.JapaneseLunisolarCalendar" /> class.</summary>
/// <returns>The earliest date and time supported by the <see cref="T:System.Globalization.JapaneseLunisolarCalendar" /> class, which is equivalent to the first moment of January 28, 1960 C.E. in the Gregorian calendar.</returns>
// Token: 0x17000366 RID: 870
// (get) Token: 0x060013DD RID: 5085 RVA: 0x0004D2FC File Offset: 0x0004B4FC
public override DateTime MinSupportedDateTime
{
get
{
return JapaneseLunisolarCalendar.JapanMin;
}
}
/// <summary>Gets the maximum date and time supported by the <see cref="T:System.Globalization.JapaneseLunisolarCalendar" /> class.</summary>
/// <returns>The latest date and time supported by the <see cref="T:System.Globalization.JapaneseLunisolarCalendar" /> class, which is equivalent to the last moment of January 22, 2050 C.E. in the Gregorian calendar.</returns>
// Token: 0x17000367 RID: 871
// (get) Token: 0x060013DE RID: 5086 RVA: 0x0004D304 File Offset: 0x0004B504
public override DateTime MaxSupportedDateTime
{
get
{
return JapaneseLunisolarCalendar.JapanMax;
}
}
/// <summary>Specifies the current era.</summary>
// Token: 0x0400057F RID: 1407
public const int JapaneseEra = 1;
// Token: 0x04000580 RID: 1408
internal static readonly CCEastAsianLunisolarEraHandler era_handler = new CCEastAsianLunisolarEraHandler();
// Token: 0x04000581 RID: 1409
private static DateTime JapanMin = new DateTime(1960, 1, 28, 0, 0, 0);
// Token: 0x04000582 RID: 1410
private static DateTime JapanMax = new DateTime(2050, 1, 22, 23, 59, 59);
}
}
@@ -0,0 +1,375 @@
using System;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Represents the Julian calendar.</summary>
// Token: 0x0200018F RID: 399
[MonoTODO("Serialization format not compatible with .NET")]
[ComVisible(true)]
[Serializable]
public class JulianCalendar : Calendar
{
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.JulianCalendar" /> class.</summary>
// Token: 0x060013DF RID: 5087 RVA: 0x0004D30C File Offset: 0x0004B50C
public JulianCalendar()
{
this.M_AbbrEraNames = new string[] { "C.E." };
this.M_EraNames = new string[] { "Common Era" };
if (this.twoDigitYearMax == 99)
{
this.twoDigitYearMax = 2029;
}
}
/// <summary>Gets the list of eras in the <see cref="T:System.Globalization.JulianCalendar" />.</summary>
/// <returns>An array of integers that represents the eras in the <see cref="T:System.Globalization.JulianCalendar" />.</returns>
// Token: 0x17000368 RID: 872
// (get) Token: 0x060013E1 RID: 5089 RVA: 0x0004D394 File Offset: 0x0004B594
public override int[] Eras
{
get
{
return new int[] { JulianCalendar.JulianEra };
}
}
/// <summary>Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.</summary>
/// <returns>The last year of a 100-year range that can be represented by a 2-digit year.</returns>
// Token: 0x17000369 RID: 873
// (get) Token: 0x060013E2 RID: 5090 RVA: 0x0004D3A4 File Offset: 0x0004B5A4
// (set) Token: 0x060013E3 RID: 5091 RVA: 0x0004D3AC File Offset: 0x0004B5AC
public override int TwoDigitYearMax
{
get
{
return this.twoDigitYearMax;
}
set
{
base.CheckReadOnly();
base.M_ArgumentInRange("value", value, 100, this.M_MaxYear);
this.twoDigitYearMax = value;
}
}
// Token: 0x060013E4 RID: 5092 RVA: 0x0004D3DC File Offset: 0x0004B5DC
internal void M_CheckEra(ref int era)
{
if (era == 0)
{
era = JulianCalendar.JulianEra;
}
if (era != JulianCalendar.JulianEra)
{
throw new ArgumentException("Era value was not valid.");
}
}
// Token: 0x060013E5 RID: 5093 RVA: 0x0004D404 File Offset: 0x0004B604
internal override void M_CheckYE(int year, ref int era)
{
this.M_CheckEra(ref era);
base.M_ArgumentInRange("year", year, 1, 9999);
}
// Token: 0x060013E6 RID: 5094 RVA: 0x0004D42C File Offset: 0x0004B62C
internal void M_CheckYME(int year, int month, ref int era)
{
this.M_CheckYE(year, ref era);
if (month < 1 || month > 12)
{
throw new ArgumentOutOfRangeException("month", "Month must be between one and twelve.");
}
}
// Token: 0x060013E7 RID: 5095 RVA: 0x0004D458 File Offset: 0x0004B658
internal void M_CheckYMDE(int year, int month, int day, ref int era)
{
this.M_CheckYME(year, month, ref era);
base.M_ArgumentInRange("day", day, 1, this.GetDaysInMonth(year, month, era));
if (year == 9999 && ((month == 10 && day > 19) || month > 10))
{
throw new ArgumentOutOfRangeException("The maximum Julian date is 19. 10. 9999.");
}
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of months away from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of months to the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add months. </param>
/// <param name="months">The number of months to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="months" /> is less than -120000.-or- <paramref name="months" /> is greater than 120000. </exception>
// Token: 0x060013E8 RID: 5096 RVA: 0x0004D4B8 File Offset: 0x0004B6B8
public override DateTime AddMonths(DateTime time, int months)
{
int num = CCFixed.FromDateTime(time);
int num2;
int num3;
int num4;
CCJulianCalendar.dmy_from_fixed(out num2, out num3, out num4, num);
num3 += months;
num4 += CCMath.div_mod(out num3, num3, 12);
num = CCJulianCalendar.fixed_from_dmy(num2, num3, num4);
return CCFixed.ToDateTime(num).Add(time.TimeOfDay);
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of years away from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of years to the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add years. </param>
/// <param name="years">The number of years to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range. </exception>
// Token: 0x060013E9 RID: 5097 RVA: 0x0004D508 File Offset: 0x0004B708
public override DateTime AddYears(DateTime time, int years)
{
int num = CCFixed.FromDateTime(time);
int num2;
int num3;
int num4;
CCJulianCalendar.dmy_from_fixed(out num2, out num3, out num4, num);
num4 += years;
num = CCJulianCalendar.fixed_from_dmy(num2, num3, num4);
return CCFixed.ToDateTime(num).Add(time.TimeOfDay);
}
/// <summary>Returns the day of the month in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 1 to 31 that represents the day of the month in <paramref name="time" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060013EA RID: 5098 RVA: 0x0004D54C File Offset: 0x0004B74C
public override int GetDayOfMonth(DateTime time)
{
int num = CCFixed.FromDateTime(time);
return CCJulianCalendar.day_from_fixed(num);
}
/// <summary>Returns the day of the week in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>A <see cref="T:System.DayOfWeek" /> value that represents the day of the week in <paramref name="time" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060013EB RID: 5099 RVA: 0x0004D568 File Offset: 0x0004B768
public override DayOfWeek GetDayOfWeek(DateTime time)
{
int num = CCFixed.FromDateTime(time);
return CCFixed.day_of_week(num);
}
/// <summary>Returns the day of the year in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 1 to 366 that represents the day of the year in <paramref name="time" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060013EC RID: 5100 RVA: 0x0004D584 File Offset: 0x0004B784
public override int GetDayOfYear(DateTime time)
{
int num = CCFixed.FromDateTime(time);
int num2 = CCJulianCalendar.year_from_fixed(num);
int num3 = CCJulianCalendar.fixed_from_dmy(1, 1, num2);
return num - num3 + 1;
}
/// <summary>Returns the number of days in the specified month in the specified year in the specified era.</summary>
/// <returns>The number of days in the specified month in the specified year in the specified era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="era" /> is outside the range supported by the calendar. -or- <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar. </exception>
// Token: 0x060013ED RID: 5101 RVA: 0x0004D5B0 File Offset: 0x0004B7B0
public override int GetDaysInMonth(int year, int month, int era)
{
this.M_CheckYME(year, month, ref era);
int num = CCJulianCalendar.fixed_from_dmy(1, month, year);
int num2 = CCJulianCalendar.fixed_from_dmy(1, month + 1, year);
return num2 - num;
}
/// <summary>Returns the number of days in the specified year in the specified era.</summary>
/// <returns>The number of days in the specified year in the specified era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="era" /> is outside the range supported by the calendar. -or- <paramref name="year" /> is outside the range supported by the calendar. </exception>
// Token: 0x060013EE RID: 5102 RVA: 0x0004D5E0 File Offset: 0x0004B7E0
public override int GetDaysInYear(int year, int era)
{
this.M_CheckYE(year, ref era);
int num = CCJulianCalendar.fixed_from_dmy(1, 1, year);
int num2 = CCJulianCalendar.fixed_from_dmy(1, 1, year + 1);
return num2 - num;
}
/// <summary>Returns the era in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer that represents the era in <paramref name="time" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060013EF RID: 5103 RVA: 0x0004D610 File Offset: 0x0004B810
public override int GetEra(DateTime time)
{
return JulianCalendar.JulianEra;
}
/// <summary>Calculates the leap month for a specified year and era.</summary>
/// <returns>A positive integer that indicates the leap month in the specified year and era. Alternatively, this method returns zero if the calendar does not support a leap month, or if <paramref name="year" /> and <paramref name="era" /> do not specify a leap year.</returns>
/// <param name="year">An integer that represents the year.</param>
/// <param name="era">An integer that represents the era.</param>
// Token: 0x060013F0 RID: 5104 RVA: 0x0004D618 File Offset: 0x0004B818
[ComVisible(false)]
public override int GetLeapMonth(int year, int era)
{
return 0;
}
/// <summary>Returns the month in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 1 to 12 that represents the month in <paramref name="time" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060013F1 RID: 5105 RVA: 0x0004D61C File Offset: 0x0004B81C
public override int GetMonth(DateTime time)
{
int num = CCFixed.FromDateTime(time);
return CCJulianCalendar.month_from_fixed(num);
}
/// <summary>Returns the number of months in the specified year in the specified era.</summary>
/// <returns>The number of months in the specified year in the specified era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="era" /> is outside the range supported by the calendar. -or- <paramref name="year" /> is outside the range supported by the calendar. </exception>
// Token: 0x060013F2 RID: 5106 RVA: 0x0004D638 File Offset: 0x0004B838
public override int GetMonthsInYear(int year, int era)
{
this.M_CheckYE(year, ref era);
return 12;
}
/// <summary>Returns the year in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer that represents the year in <paramref name="time" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060013F3 RID: 5107 RVA: 0x0004D648 File Offset: 0x0004B848
public override int GetYear(DateTime time)
{
int num = CCFixed.FromDateTime(time);
return CCJulianCalendar.year_from_fixed(num);
}
/// <summary>Determines whether the specified date in the specified era is a leap day.</summary>
/// <returns>true if the specified day is a leap day; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="day">An integer from 1 to 31 that represents the day. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="day" /> is outside the range supported by the calendar. -or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060013F4 RID: 5108 RVA: 0x0004D664 File Offset: 0x0004B864
public override bool IsLeapDay(int year, int month, int day, int era)
{
this.M_CheckYMDE(year, month, day, ref era);
return this.IsLeapYear(year) && month == 2 && day == 29;
}
/// <summary>Determines whether the specified month in the specified year in the specified era is a leap month.</summary>
/// <returns>This method always returns false, unless overridden by a derived class.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar. -or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060013F5 RID: 5109 RVA: 0x0004D698 File Offset: 0x0004B898
public override bool IsLeapMonth(int year, int month, int era)
{
this.M_CheckYME(year, month, ref era);
return false;
}
/// <summary>Determines whether the specified year in the specified era is a leap year.</summary>
/// <returns>true if the specified year is a leap year; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar. -or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060013F6 RID: 5110 RVA: 0x0004D6A8 File Offset: 0x0004B8A8
public override bool IsLeapYear(int year, int era)
{
this.M_CheckYE(year, ref era);
return CCJulianCalendar.is_leap_year(year);
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is set to the specified date and time in the specified era.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that is set to the specified date and time in the current era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="day">An integer from 1 to 31 that represents the day. </param>
/// <param name="hour">An integer from 0 to 23 that represents the hour. </param>
/// <param name="minute">An integer from 0 to 59 that represents the minute. </param>
/// <param name="second">An integer from 0 to 59 that represents the second. </param>
/// <param name="millisecond">An integer from 0 to 999 that represents the millisecond. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="day" /> is outside the range supported by the calendar.-or- <paramref name="hour" /> is less than zero or greater than 23.-or- <paramref name="minute" /> is less than zero or greater than 59.-or- <paramref name="second" /> is less than zero or greater than 59.-or- <paramref name="millisecond" /> is less than zero or greater than 999. -or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060013F7 RID: 5111 RVA: 0x0004D6BC File Offset: 0x0004B8BC
public override DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era)
{
this.M_CheckYMDE(year, month, day, ref era);
base.M_CheckHMSM(hour, minute, second, millisecond);
int num = CCJulianCalendar.fixed_from_dmy(day, month, year);
return CCFixed.ToDateTime(num, hour, minute, second, (double)millisecond);
}
/// <summary>Converts the specified year to a four-digit year by using the <see cref="P:System.Globalization.JulianCalendar.TwoDigitYearMax" /> property to determine the appropriate century.</summary>
/// <returns>An integer that contains the four-digit representation of <paramref name="year" />.</returns>
/// <param name="year">A two-digit or four-digit integer that represents the year to convert. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar. </exception>
// Token: 0x060013F8 RID: 5112 RVA: 0x0004D6FC File Offset: 0x0004B8FC
public override int ToFourDigitYear(int year)
{
return base.ToFourDigitYear(year);
}
/// <summary>Gets a value that indicates whether the current calendar is solar-based, lunar-based, or a combination of both.</summary>
/// <returns>Always returns the <see cref="F:System.Globalization.CalendarAlgorithmType.SolarCalendar" /> type.</returns>
// Token: 0x1700036A RID: 874
// (get) Token: 0x060013F9 RID: 5113 RVA: 0x0004D708 File Offset: 0x0004B908
[ComVisible(false)]
public override CalendarAlgorithmType AlgorithmType
{
get
{
return CalendarAlgorithmType.SolarCalendar;
}
}
/// <summary>Gets the earliest date and time supported by the <see cref="T:System.Globalization.JulianCalendar" /> class.</summary>
/// <returns>The earliest date and time supported by the <see cref="T:System.Globalization.JulianCalendar" /> class, which is equivalent to the first moment of January 1, 0001 C.E. in the Gregorian calendar.</returns>
// Token: 0x1700036B RID: 875
// (get) Token: 0x060013FA RID: 5114 RVA: 0x0004D70C File Offset: 0x0004B90C
[ComVisible(false)]
public override DateTime MinSupportedDateTime
{
get
{
return JulianCalendar.JulianMin;
}
}
/// <summary>Gets the latest date and time supported by the <see cref="T:System.Globalization.JulianCalendar" /> class.</summary>
/// <returns>The latest date and time supported by the <see cref="T:System.Globalization.JulianCalendar" /> class, which is equivalent to the last moment of December 31, 9999 C.E. in the Gregorian calendar.</returns>
// Token: 0x1700036C RID: 876
// (get) Token: 0x060013FB RID: 5115 RVA: 0x0004D714 File Offset: 0x0004B914
[ComVisible(false)]
public override DateTime MaxSupportedDateTime
{
get
{
return JulianCalendar.JulianMax;
}
}
/// <summary>Represents the current era. This field is constant.</summary>
// Token: 0x04000583 RID: 1411
public static readonly int JulianEra = 1;
// Token: 0x04000584 RID: 1412
private static DateTime JulianMin = new DateTime(1, 1, 1, 0, 0, 0);
// Token: 0x04000585 RID: 1413
private static DateTime JulianMax = new DateTime(9999, 12, 31, 11, 59, 59);
}
}
@@ -0,0 +1,375 @@
using System;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Represents the Korean calendar.</summary>
// Token: 0x02000190 RID: 400
[MonoTODO("Serialization format not compatible with .NET")]
[ComVisible(true)]
[Serializable]
public class KoreanCalendar : Calendar
{
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.KoreanCalendar" /> class.</summary>
// Token: 0x060013FC RID: 5116 RVA: 0x0004D71C File Offset: 0x0004B91C
public KoreanCalendar()
{
this.M_AbbrEraNames = new string[] { "K.C.E." };
this.M_EraNames = new string[] { "Korean Current Era" };
if (this.twoDigitYearMax == 99)
{
this.twoDigitYearMax = 4362;
}
}
// Token: 0x060013FD RID: 5117 RVA: 0x0004D770 File Offset: 0x0004B970
static KoreanCalendar()
{
KoreanCalendar.M_EraHandler.appendEra(1, CCGregorianCalendar.fixed_from_dmy(1, 1, -2332));
}
/// <summary>Gets the list of eras in the <see cref="T:System.Globalization.KoreanCalendar" />.</summary>
/// <returns>An array of integers that represents the eras in the <see cref="T:System.Globalization.KoreanCalendar" />.</returns>
// Token: 0x1700036D RID: 877
// (get) Token: 0x060013FE RID: 5118 RVA: 0x0004D7C8 File Offset: 0x0004B9C8
public override int[] Eras
{
get
{
return (int[])KoreanCalendar.M_EraHandler.Eras.Clone();
}
}
/// <summary>Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.</summary>
/// <returns>The last year of a 100-year range that can be represented by a 2-digit year.</returns>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.RegistryPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x1700036E RID: 878
// (get) Token: 0x060013FF RID: 5119 RVA: 0x0004D7E0 File Offset: 0x0004B9E0
// (set) Token: 0x06001400 RID: 5120 RVA: 0x0004D7E8 File Offset: 0x0004B9E8
public override int TwoDigitYearMax
{
get
{
return this.twoDigitYearMax;
}
set
{
base.CheckReadOnly();
base.M_ArgumentInRange("value", value, 100, this.M_MaxYear);
this.twoDigitYearMax = value;
}
}
// Token: 0x06001401 RID: 5121 RVA: 0x0004D818 File Offset: 0x0004BA18
internal void M_CheckEra(ref int era)
{
if (era == 0)
{
era = 1;
}
if (!KoreanCalendar.M_EraHandler.ValidEra(era))
{
throw new ArgumentException("Era value was not valid.");
}
}
// Token: 0x06001402 RID: 5122 RVA: 0x0004D84C File Offset: 0x0004BA4C
internal int M_CheckYEG(int year, ref int era)
{
this.M_CheckEra(ref era);
return KoreanCalendar.M_EraHandler.GregorianYear(year, era);
}
// Token: 0x06001403 RID: 5123 RVA: 0x0004D864 File Offset: 0x0004BA64
internal override void M_CheckYE(int year, ref int era)
{
this.M_CheckYEG(year, ref era);
}
// Token: 0x06001404 RID: 5124 RVA: 0x0004D870 File Offset: 0x0004BA70
internal int M_CheckYMEG(int year, int month, ref int era)
{
int num = this.M_CheckYEG(year, ref era);
if (month < 1 || month > 12)
{
throw new ArgumentOutOfRangeException("month", "Month must be between one and twelve.");
}
return num;
}
// Token: 0x06001405 RID: 5125 RVA: 0x0004D8A8 File Offset: 0x0004BAA8
internal int M_CheckYMDEG(int year, int month, int day, ref int era)
{
int num = this.M_CheckYMEG(year, month, ref era);
base.M_ArgumentInRange("day", day, 1, this.GetDaysInMonth(year, month, era));
return num;
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of months away from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of months to the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add months. </param>
/// <param name="months">The number of months to add. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="months" /> is less than -120000.-or- <paramref name="months" /> is greater than 120000. </exception>
// Token: 0x06001406 RID: 5126 RVA: 0x0004D8DC File Offset: 0x0004BADC
public override DateTime AddMonths(DateTime time, int months)
{
return CCGregorianCalendar.AddMonths(time, months);
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of years away from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of years to the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add years. </param>
/// <param name="years">The number of years to add. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="years" /> or <paramref name="time" /> is out of range.</exception>
// Token: 0x06001407 RID: 5127 RVA: 0x0004D8E8 File Offset: 0x0004BAE8
public override DateTime AddYears(DateTime time, int years)
{
return CCGregorianCalendar.AddYears(time, years);
}
/// <summary>Returns the day of the month in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 1 to 31 that represents the day of the month in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x06001408 RID: 5128 RVA: 0x0004D8F4 File Offset: 0x0004BAF4
public override int GetDayOfMonth(DateTime time)
{
return CCGregorianCalendar.GetDayOfMonth(time);
}
/// <summary>Returns the day of the week in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>A <see cref="T:System.DayOfWeek" /> value that represents the day of the week in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x06001409 RID: 5129 RVA: 0x0004D8FC File Offset: 0x0004BAFC
public override DayOfWeek GetDayOfWeek(DateTime time)
{
int num = CCFixed.FromDateTime(time);
return CCFixed.day_of_week(num);
}
/// <summary>Returns the day of the year in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 1 to 366 that represents the day of the year in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x0600140A RID: 5130 RVA: 0x0004D918 File Offset: 0x0004BB18
public override int GetDayOfYear(DateTime time)
{
return CCGregorianCalendar.GetDayOfYear(time);
}
/// <summary>Returns the number of days in the specified month in the specified year in the specified era.</summary>
/// <returns>The number of days in the specified month in the specified year in the specified era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x0600140B RID: 5131 RVA: 0x0004D920 File Offset: 0x0004BB20
public override int GetDaysInMonth(int year, int month, int era)
{
int num = this.M_CheckYMEG(year, month, ref era);
return CCGregorianCalendar.GetDaysInMonth(num, month);
}
/// <summary>Returns the number of days in the specified year in the specified era.</summary>
/// <returns>The number of days in the specified year in the specified era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x0600140C RID: 5132 RVA: 0x0004D940 File Offset: 0x0004BB40
public override int GetDaysInYear(int year, int era)
{
int num = this.M_CheckYEG(year, ref era);
return CCGregorianCalendar.GetDaysInYear(num);
}
/// <summary>Returns the era in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer that represents the era in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x0600140D RID: 5133 RVA: 0x0004D960 File Offset: 0x0004BB60
public override int GetEra(DateTime time)
{
int num = CCFixed.FromDateTime(time);
int num2;
KoreanCalendar.M_EraHandler.EraYear(out num2, num);
return num2;
}
/// <summary>Calculates the leap month for a specified year and era.</summary>
/// <returns>The return value is always 0 because the <see cref="T:System.Globalization.KoreanCalendar" /> class does not support the notion of a leap month.</returns>
/// <param name="year">A year.</param>
/// <param name="era">An era.</param>
// Token: 0x0600140E RID: 5134 RVA: 0x0004D984 File Offset: 0x0004BB84
[ComVisible(false)]
public override int GetLeapMonth(int year, int era)
{
return 0;
}
/// <summary>Returns the month in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 1 to 12 that represents the month in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x0600140F RID: 5135 RVA: 0x0004D988 File Offset: 0x0004BB88
public override int GetMonth(DateTime time)
{
return CCGregorianCalendar.GetMonth(time);
}
/// <summary>Returns the number of months in the specified year in the specified era.</summary>
/// <returns>The number of months in the specified year in the specified era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x06001410 RID: 5136 RVA: 0x0004D990 File Offset: 0x0004BB90
public override int GetMonthsInYear(int year, int era)
{
this.M_CheckYEG(year, ref era);
return 12;
}
/// <summary>Returns the week of the year that includes the date in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>A 1-based integer that represents the week of the year that includes the date in the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
/// <param name="rule">One of the <see cref="T:System.Globalization.CalendarWeekRule" /> values that defines a calendar week. </param>
/// <param name="firstDayOfWeek">One of the <see cref="T:System.DayOfWeek" /> values that represents the first day of the week. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="time" /> or <paramref name="firstDayOfWeek" /> is outside the range supported by the calendar.-or- <paramref name="rule" /> is not a valid <see cref="T:System.Globalization.CalendarWeekRule" /> value. </exception>
// Token: 0x06001411 RID: 5137 RVA: 0x0004D9A0 File Offset: 0x0004BBA0
[ComVisible(false)]
public override int GetWeekOfYear(DateTime time, CalendarWeekRule rule, DayOfWeek firstDayOfWeek)
{
return base.GetWeekOfYear(time, rule, firstDayOfWeek);
}
/// <summary>Returns the year in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer that represents the year in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x06001412 RID: 5138 RVA: 0x0004D9AC File Offset: 0x0004BBAC
public override int GetYear(DateTime time)
{
int num = CCFixed.FromDateTime(time);
int num2;
return KoreanCalendar.M_EraHandler.EraYear(out num2, num);
}
/// <summary>Determines whether the specified date in the specified era is a leap day.</summary>
/// <returns>true if the specified day is a leap day; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="day">An integer from 1 to 31 that represents the day. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="day" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x06001413 RID: 5139 RVA: 0x0004D9D0 File Offset: 0x0004BBD0
public override bool IsLeapDay(int year, int month, int day, int era)
{
int num = this.M_CheckYMDEG(year, month, day, ref era);
return CCGregorianCalendar.IsLeapDay(num, month, day);
}
/// <summary>Determines whether the specified month in the specified year in the specified era is a leap month.</summary>
/// <returns>This method always returns false, unless overridden by a derived class.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x06001414 RID: 5140 RVA: 0x0004D9F4 File Offset: 0x0004BBF4
public override bool IsLeapMonth(int year, int month, int era)
{
this.M_CheckYMEG(year, month, ref era);
return false;
}
/// <summary>Determines whether the specified year in the specified era is a leap year.</summary>
/// <returns>true if the specified year is a leap year; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x06001415 RID: 5141 RVA: 0x0004DA04 File Offset: 0x0004BC04
public override bool IsLeapYear(int year, int era)
{
int num = this.M_CheckYEG(year, ref era);
return CCGregorianCalendar.is_leap_year(num);
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is set to the specified date and time in the specified era.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that is set to the specified date and time in the current era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="day">An integer from 1 to 31 that represents the day. </param>
/// <param name="hour">An integer from 0 to 23 that represents the hour. </param>
/// <param name="minute">An integer from 0 to 59 that represents the minute. </param>
/// <param name="second">An integer from 0 to 59 that represents the second. </param>
/// <param name="millisecond">An integer from 0 to 999 that represents the millisecond. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="day" /> is outside the range supported by the calendar.-or- <paramref name="hour" /> is less than zero or greater than 23.-or- <paramref name="minute" /> is less than zero or greater than 59.-or- <paramref name="second" /> is less than zero or greater than 59.-or- <paramref name="millisecond" /> is less than zero or greater than 999.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x06001416 RID: 5142 RVA: 0x0004DA24 File Offset: 0x0004BC24
public override DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era)
{
int num = this.M_CheckYMDEG(year, month, day, ref era);
base.M_CheckHMSM(hour, minute, second, millisecond);
return CCGregorianCalendar.ToDateTime(num, month, day, hour, minute, second, millisecond);
}
/// <summary>Converts the specified year to a four-digit year by using the <see cref="P:System.Globalization.KoreanCalendar.TwoDigitYearMax" /> property to determine the appropriate century.</summary>
/// <returns>An integer that contains the four-digit representation of <paramref name="year" />.</returns>
/// <param name="year">A two-digit or four-digit integer that represents the year to convert. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar. </exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.RegistryPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="\" />
/// </PermissionSet>
// Token: 0x06001417 RID: 5143 RVA: 0x0004DA5C File Offset: 0x0004BC5C
public override int ToFourDigitYear(int year)
{
return base.ToFourDigitYear(year);
}
/// <summary>Gets the earliest date and time supported by the <see cref="T:System.Globalization.KoreanCalendar" /> class.</summary>
/// <returns>The earliest date and time supported by the <see cref="T:System.Globalization.KoreanCalendar" /> class, which is equivalent to the first moment of January 1, 0001 C.E. in the Gregorian calendar.</returns>
// Token: 0x1700036F RID: 879
// (get) Token: 0x06001418 RID: 5144 RVA: 0x0004DA68 File Offset: 0x0004BC68
[ComVisible(false)]
public override DateTime MinSupportedDateTime
{
get
{
return KoreanCalendar.KoreanMin;
}
}
/// <summary>Gets the latest date and time supported by the <see cref="T:System.Globalization.KoreanCalendar" /> class.</summary>
/// <returns>The latest date and time supported by the <see cref="T:System.Globalization.KoreanCalendar" /> class, which is equivalent to the last moment of December 31, 9999 C.E. in the Gregorian calendar.</returns>
// Token: 0x17000370 RID: 880
// (get) Token: 0x06001419 RID: 5145 RVA: 0x0004DA70 File Offset: 0x0004BC70
[ComVisible(false)]
public override DateTime MaxSupportedDateTime
{
get
{
return KoreanCalendar.KoreanMax;
}
}
/// <summary>Represents the current era. This field is constant.</summary>
// Token: 0x04000586 RID: 1414
public const int KoreanEra = 1;
// Token: 0x04000587 RID: 1415
internal static readonly CCGregorianEraHandler M_EraHandler = new CCGregorianEraHandler();
// Token: 0x04000588 RID: 1416
private static DateTime KoreanMin = new DateTime(1, 1, 1, 0, 0, 0);
// Token: 0x04000589 RID: 1417
private static DateTime KoreanMax = new DateTime(9999, 12, 31, 11, 59, 59);
}
}
@@ -0,0 +1,87 @@
using System;
namespace System.Globalization
{
/// <summary>Represents time in divisions, such as months, days, and years. Years are calculated using the Gregorian calendar, while days and months are calculated using the lunisolar calendar.</summary>
// Token: 0x02000191 RID: 401
[Serializable]
public class KoreanLunisolarCalendar : EastAsianLunisolarCalendar
{
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.KoreanLunisolarCalendar" /> class. </summary>
// Token: 0x0600141A RID: 5146 RVA: 0x0004DA78 File Offset: 0x0004BC78
[MonoTODO]
public KoreanLunisolarCalendar()
: base(KoreanLunisolarCalendar.era_handler)
{
}
// Token: 0x0600141B RID: 5147 RVA: 0x0004DA88 File Offset: 0x0004BC88
static KoreanLunisolarCalendar()
{
KoreanLunisolarCalendar.era_handler.appendEra(1, CCFixed.FromDateTime(new DateTime(1, 1, 1)));
}
/// <summary>Gets the eras that correspond to the range of dates and times supported by the current <see cref="T:System.Globalization.KoreanLunisolarCalendar" /> object.</summary>
/// <returns>An array of 32-bit signed integers that specify the relevant eras. The return value for a <see cref="T:System.Globalization.KoreanLunisolarCalendar" /> object is always an array containing one element equal to the <see cref="F:System.Globalization.KoreanLunisolarCalendar.GregorianEra" /> value.</returns>
// Token: 0x17000371 RID: 881
// (get) Token: 0x0600141C RID: 5148 RVA: 0x0004DAE4 File Offset: 0x0004BCE4
public override int[] Eras
{
get
{
return (int[])KoreanLunisolarCalendar.era_handler.Eras.Clone();
}
}
/// <summary>Retrieves the era that corresponds to the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer that represents the era specified by the <paramref name="time" /> parameter. The return value for a <see cref="T:System.Globalization.KoreanLunisolarCalendar" /> object is always the <see cref="F:System.Globalization.KoreanLunisolarCalendar.GregorianEra" /> value.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="time" /> represents a date and time less than <see cref="P:System.Globalization.KoreanLunisolarCalendar.MinSupportedDateTime" /> or greater than <see cref="P:System.Globalization.KoreanLunisolarCalendar.MaxSupportedDateTime" />.</exception>
// Token: 0x0600141D RID: 5149 RVA: 0x0004DAFC File Offset: 0x0004BCFC
public override int GetEra(DateTime time)
{
int num = CCFixed.FromDateTime(time);
int num2;
KoreanLunisolarCalendar.era_handler.EraYear(out num2, num);
return num2;
}
/// <summary>Gets the minimum date and time supported by the <see cref="T:System.Globalization.KoreanLunisolarCalendar" /> class.</summary>
/// <returns>The earliest date and time supported by the <see cref="T:System.Globalization.KoreanLunisolarCalendar" /> class, which is equivalent to the first moment of February 14, 918 C.E. in the Gregorian calendar.</returns>
// Token: 0x17000372 RID: 882
// (get) Token: 0x0600141E RID: 5150 RVA: 0x0004DB20 File Offset: 0x0004BD20
public override DateTime MinSupportedDateTime
{
get
{
return KoreanLunisolarCalendar.KoreanMin;
}
}
/// <summary>Gets the maximum date and time supported by the <see cref="T:System.Globalization.KoreanLunisolarCalendar" /> class.</summary>
/// <returns>The latest date and time supported by the <see cref="T:System.Globalization.KoreanLunisolarCalendar" /> class, which is equivalent to the last moment of February 10, 2051 C.E. in the Gregorian calendar.</returns>
// Token: 0x17000373 RID: 883
// (get) Token: 0x0600141F RID: 5151 RVA: 0x0004DB28 File Offset: 0x0004BD28
public override DateTime MaxSupportedDateTime
{
get
{
return KoreanLunisolarCalendar.KoreanMax;
}
}
/// <summary>Specifies the Gregorian era that corresponds to the current <see cref="T:System.Globalization.KoreanLunisolarCalendar" /> object.</summary>
// Token: 0x0400058A RID: 1418
public const int GregorianEra = 1;
// Token: 0x0400058B RID: 1419
internal static readonly CCEastAsianLunisolarEraHandler era_handler = new CCEastAsianLunisolarEraHandler();
// Token: 0x0400058C RID: 1420
private static DateTime KoreanMin = new DateTime(918, 2, 14, 0, 0, 0);
// Token: 0x0400058D RID: 1421
private static DateTime KoreanMax = new DateTime(2051, 2, 10, 23, 59, 59);
}
}
@@ -0,0 +1,1281 @@
using System;
using System.Runtime.InteropServices;
using System.Threading;
namespace System.Globalization
{
/// <summary>Defines how numeric values are formatted and displayed, depending on the culture.</summary>
// Token: 0x02000192 RID: 402
[ComVisible(true)]
[Serializable]
public sealed class NumberFormatInfo : ICloneable, IFormatProvider
{
// Token: 0x06001420 RID: 5152 RVA: 0x0004DB30 File Offset: 0x0004BD30
internal NumberFormatInfo(int lcid, bool read_only)
{
this.isReadOnly = read_only;
if (lcid != 127)
{
lcid = 127;
}
int num = lcid;
if (num == 127)
{
this.isReadOnly = false;
this.currencyDecimalDigits = 2;
this.currencyDecimalSeparator = ".";
this.currencyGroupSeparator = ",";
this.currencyGroupSizes = new int[] { 3 };
this.currencyNegativePattern = 0;
this.currencyPositivePattern = 0;
this.currencySymbol = "$";
this.nanSymbol = "NaN";
this.negativeInfinitySymbol = "-Infinity";
this.negativeSign = "-";
this.numberDecimalDigits = 2;
this.numberDecimalSeparator = ".";
this.numberGroupSeparator = ",";
this.numberGroupSizes = new int[] { 3 };
this.numberNegativePattern = 1;
this.percentDecimalDigits = 2;
this.percentDecimalSeparator = ".";
this.percentGroupSeparator = ",";
this.percentGroupSizes = new int[] { 3 };
this.percentNegativePattern = 0;
this.percentPositivePattern = 0;
this.percentSymbol = "%";
this.perMilleSymbol = "‰";
this.positiveInfinitySymbol = "Infinity";
this.positiveSign = "+";
}
}
// Token: 0x06001421 RID: 5153 RVA: 0x0004DC9C File Offset: 0x0004BE9C
internal NumberFormatInfo(bool read_only)
: this(127, read_only)
{
}
/// <summary>Initializes a new writable instance of the <see cref="T:System.Globalization.NumberFormatInfo" /> class that is culture-independent (invariant).</summary>
// Token: 0x06001422 RID: 5154 RVA: 0x0004DCA8 File Offset: 0x0004BEA8
public NumberFormatInfo()
: this(false)
{
}
// Token: 0x06001424 RID: 5156 RVA: 0x0004DD20 File Offset: 0x0004BF20
private void InitPatterns()
{
string[] array = this.decimalFormats.Split(new char[] { ';' }, 2);
string[] array2;
if (array.Length == 2)
{
array2 = array[0].Split(new char[] { '.' }, 2);
if (array2.Length == 2)
{
this.numberDecimalDigits = 0;
for (int i = 0; i < array2[1].Length; i++)
{
if (array2[1][i] != this.digitPattern[0])
{
break;
}
this.numberDecimalDigits++;
}
string[] array3 = array2[0].Split(new char[] { ',' });
if (array3.Length > 1)
{
this.numberGroupSizes = new int[array3.Length - 1];
for (int j = 0; j < this.numberGroupSizes.Length; j++)
{
string text = array3[j + 1];
this.numberGroupSizes[j] = text.Length;
}
}
else
{
this.numberGroupSizes = new int[1];
}
if (array[1].StartsWith("(") && array[1].EndsWith(")"))
{
this.numberNegativePattern = 0;
}
else if (array[1].StartsWith("- "))
{
this.numberNegativePattern = 2;
}
else if (array[1].StartsWith("-"))
{
this.numberNegativePattern = 1;
}
else if (array[1].EndsWith(" -"))
{
this.numberNegativePattern = 4;
}
else if (array[1].EndsWith("-"))
{
this.numberNegativePattern = 3;
}
else
{
this.numberNegativePattern = 1;
}
}
}
array = this.currencyFormats.Split(new char[] { ';' }, 2);
if (array.Length == 2)
{
array2 = array[0].Split(new char[] { '.' }, 2);
if (array2.Length == 2)
{
this.currencyDecimalDigits = 0;
for (int k = 0; k < array2[1].Length; k++)
{
if (array2[1][k] != this.zeroPattern[0])
{
break;
}
this.currencyDecimalDigits++;
}
string[] array3 = array2[0].Split(new char[] { ',' });
if (array3.Length > 1)
{
this.currencyGroupSizes = new int[array3.Length - 1];
for (int l = 0; l < this.currencyGroupSizes.Length; l++)
{
string text2 = array3[l + 1];
this.currencyGroupSizes[l] = text2.Length;
}
}
else
{
this.currencyGroupSizes = new int[1];
}
if (array[1].StartsWith("(¤ ") && array[1].EndsWith(")"))
{
this.currencyNegativePattern = 14;
}
else if (array[1].StartsWith("(¤") && array[1].EndsWith(")"))
{
this.currencyNegativePattern = 0;
}
else if (array[1].StartsWith("¤ ") && array[1].EndsWith("-"))
{
this.currencyNegativePattern = 11;
}
else if (array[1].StartsWith("¤") && array[1].EndsWith("-"))
{
this.currencyNegativePattern = 3;
}
else if (array[1].StartsWith("(") && array[1].EndsWith(" ¤"))
{
this.currencyNegativePattern = 15;
}
else if (array[1].StartsWith("(") && array[1].EndsWith("¤"))
{
this.currencyNegativePattern = 4;
}
else if (array[1].StartsWith("-") && array[1].EndsWith(" ¤"))
{
this.currencyNegativePattern = 8;
}
else if (array[1].StartsWith("-") && array[1].EndsWith("¤"))
{
this.currencyNegativePattern = 5;
}
else if (array[1].StartsWith("-¤ "))
{
this.currencyNegativePattern = 9;
}
else if (array[1].StartsWith("-¤"))
{
this.currencyNegativePattern = 1;
}
else if (array[1].StartsWith("¤ -"))
{
this.currencyNegativePattern = 12;
}
else if (array[1].StartsWith("¤-"))
{
this.currencyNegativePattern = 2;
}
else if (array[1].EndsWith(" ¤-"))
{
this.currencyNegativePattern = 10;
}
else if (array[1].EndsWith("¤-"))
{
this.currencyNegativePattern = 7;
}
else if (array[1].EndsWith("- ¤"))
{
this.currencyNegativePattern = 13;
}
else if (array[1].EndsWith("-¤"))
{
this.currencyNegativePattern = 6;
}
else
{
this.currencyNegativePattern = 0;
}
if (array[0].StartsWith("¤ "))
{
this.currencyPositivePattern = 2;
}
else if (array[0].StartsWith("¤"))
{
this.currencyPositivePattern = 0;
}
else if (array[0].EndsWith(" ¤"))
{
this.currencyPositivePattern = 3;
}
else if (array[0].EndsWith("¤"))
{
this.currencyPositivePattern = 1;
}
else
{
this.currencyPositivePattern = 0;
}
}
}
if (this.percentFormats.StartsWith("%"))
{
this.percentPositivePattern = 2;
this.percentNegativePattern = 2;
}
else if (this.percentFormats.EndsWith(" %"))
{
this.percentPositivePattern = 0;
this.percentNegativePattern = 0;
}
else if (this.percentFormats.EndsWith("%"))
{
this.percentPositivePattern = 1;
this.percentNegativePattern = 1;
}
else
{
this.percentPositivePattern = 0;
this.percentNegativePattern = 0;
}
array2 = this.percentFormats.Split(new char[] { '.' }, 2);
if (array2.Length == 2)
{
this.percentDecimalDigits = 0;
for (int m = 0; m < array2[1].Length; m++)
{
if (array2[1][m] != this.digitPattern[0])
{
break;
}
this.percentDecimalDigits++;
}
string[] array3 = array2[0].Split(new char[] { ',' });
if (array3.Length > 1)
{
this.percentGroupSizes = new int[array3.Length - 1];
for (int n = 0; n < this.percentGroupSizes.Length; n++)
{
string text3 = array3[n + 1];
this.percentGroupSizes[n] = text3.Length;
}
}
else
{
this.percentGroupSizes = new int[1];
}
}
}
/// <summary>Gets or sets the number of decimal places to use in currency values.</summary>
/// <returns>The number of decimal places to use in currency values. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is 2.</returns>
/// <exception cref="T:System.ArgumentOutOfRangeException">The property is being set to a value that is less than 0 or greater than 99. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
// Token: 0x17000374 RID: 884
// (get) Token: 0x06001425 RID: 5157 RVA: 0x0004E458 File Offset: 0x0004C658
// (set) Token: 0x06001426 RID: 5158 RVA: 0x0004E460 File Offset: 0x0004C660
public int CurrencyDecimalDigits
{
get
{
return this.currencyDecimalDigits;
}
set
{
if (value < 0 || value > 99)
{
throw new ArgumentOutOfRangeException("The value specified for the property is less than 0 or greater than 99");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
this.currencyDecimalDigits = value;
}
}
/// <summary>Gets or sets the string to use as the decimal separator in currency values.</summary>
/// <returns>The string to use as the decimal separator in currency values. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is ".".</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
/// <exception cref="T:System.ArgumentException">The property is being set to an empty string.</exception>
// Token: 0x17000375 RID: 885
// (get) Token: 0x06001427 RID: 5159 RVA: 0x0004E49C File Offset: 0x0004C69C
// (set) Token: 0x06001428 RID: 5160 RVA: 0x0004E4A4 File Offset: 0x0004C6A4
public string CurrencyDecimalSeparator
{
get
{
return this.currencyDecimalSeparator;
}
set
{
if (value == null)
{
throw new ArgumentNullException("The value specified for the property is a null reference");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
this.currencyDecimalSeparator = value;
}
}
/// <summary>Gets or sets the string that separates groups of digits to the left of the decimal in currency values.</summary>
/// <returns>The string that separates groups of digits to the left of the decimal in currency values. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is ",".</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
// Token: 0x17000376 RID: 886
// (get) Token: 0x06001429 RID: 5161 RVA: 0x0004E4E0 File Offset: 0x0004C6E0
// (set) Token: 0x0600142A RID: 5162 RVA: 0x0004E4E8 File Offset: 0x0004C6E8
public string CurrencyGroupSeparator
{
get
{
return this.currencyGroupSeparator;
}
set
{
if (value == null)
{
throw new ArgumentNullException("The value specified for the property is a null reference");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
this.currencyGroupSeparator = value;
}
}
/// <summary>Gets or sets the number of digits in each group to the left of the decimal in currency values.</summary>
/// <returns>The number of digits in each group to the left of the decimal in currency values. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is a one-dimensional array with only one element, which is set to 3.</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.ArgumentException">The property is being set and the array contains an entry that is less than 0 or greater than 9.-or- The property is being set and the array contains an entry, other than the last entry, that is set to 0. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
// Token: 0x17000377 RID: 887
// (get) Token: 0x0600142B RID: 5163 RVA: 0x0004E524 File Offset: 0x0004C724
// (set) Token: 0x0600142C RID: 5164 RVA: 0x0004E538 File Offset: 0x0004C738
public int[] CurrencyGroupSizes
{
get
{
return (int[])this.RawCurrencyGroupSizes.Clone();
}
set
{
this.RawCurrencyGroupSizes = value;
}
}
// Token: 0x17000378 RID: 888
// (get) Token: 0x0600142D RID: 5165 RVA: 0x0004E544 File Offset: 0x0004C744
// (set) Token: 0x0600142E RID: 5166 RVA: 0x0004E54C File Offset: 0x0004C74C
internal int[] RawCurrencyGroupSizes
{
get
{
return this.currencyGroupSizes;
}
set
{
if (value == null)
{
throw new ArgumentNullException("The value specified for the property is a null reference");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
if (value.Length == 0)
{
this.currencyGroupSizes = new int[0];
return;
}
int num = value.Length - 1;
for (int i = 0; i < num; i++)
{
if (value[i] < 1 || value[i] > 9)
{
throw new ArgumentOutOfRangeException("One of the elements in the array specified is not between 1 and 9");
}
}
if (value[num] < 0 || value[num] > 9)
{
throw new ArgumentOutOfRangeException("Last element in the array specified is not between 0 and 9");
}
this.currencyGroupSizes = (int[])value.Clone();
}
}
/// <summary>Gets or sets the format pattern for negative currency values.</summary>
/// <returns>The format pattern for negative currency values. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is 0, which represents "($n)", where "$" is the <see cref="P:System.Globalization.NumberFormatInfo.CurrencySymbol" /> and <paramref name="n" /> is a number.</returns>
/// <exception cref="T:System.ArgumentOutOfRangeException">The property is being set to a value that is less than 0 or greater than 15. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
// Token: 0x17000379 RID: 889
// (get) Token: 0x0600142F RID: 5167 RVA: 0x0004E5FC File Offset: 0x0004C7FC
// (set) Token: 0x06001430 RID: 5168 RVA: 0x0004E604 File Offset: 0x0004C804
public int CurrencyNegativePattern
{
get
{
return this.currencyNegativePattern;
}
set
{
if (value < 0 || value > 15)
{
throw new ArgumentOutOfRangeException("The value specified for the property is less than 0 or greater than 15");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
this.currencyNegativePattern = value;
}
}
/// <summary>Gets or sets the format pattern for positive currency values.</summary>
/// <returns>The format pattern for positive currency values. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is 0, which represents "$n", where "$" is the <see cref="P:System.Globalization.NumberFormatInfo.CurrencySymbol" /> and <paramref name="n" /> is a number.</returns>
/// <exception cref="T:System.ArgumentOutOfRangeException">The property is being set to a value that is less than 0 or greater than 3. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
// Token: 0x1700037A RID: 890
// (get) Token: 0x06001431 RID: 5169 RVA: 0x0004E640 File Offset: 0x0004C840
// (set) Token: 0x06001432 RID: 5170 RVA: 0x0004E648 File Offset: 0x0004C848
public int CurrencyPositivePattern
{
get
{
return this.currencyPositivePattern;
}
set
{
if (value < 0 || value > 3)
{
throw new ArgumentOutOfRangeException("The value specified for the property is less than 0 or greater than 3");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
this.currencyPositivePattern = value;
}
}
/// <summary>Gets or sets the string to use as the currency symbol.</summary>
/// <returns>The string to use as the currency symbol. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is "¤".</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
// Token: 0x1700037B RID: 891
// (get) Token: 0x06001433 RID: 5171 RVA: 0x0004E68C File Offset: 0x0004C88C
// (set) Token: 0x06001434 RID: 5172 RVA: 0x0004E694 File Offset: 0x0004C894
public string CurrencySymbol
{
get
{
return this.currencySymbol;
}
set
{
if (value == null)
{
throw new ArgumentNullException("The value specified for the property is a null reference");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
this.currencySymbol = value;
}
}
/// <summary>Gets a read-only <see cref="T:System.Globalization.NumberFormatInfo" /> that formats values based on the current culture.</summary>
/// <returns>A read-only <see cref="T:System.Globalization.NumberFormatInfo" /> based on the <see cref="T:System.Globalization.CultureInfo" /> of the current thread.</returns>
// Token: 0x1700037C RID: 892
// (get) Token: 0x06001435 RID: 5173 RVA: 0x0004E6D0 File Offset: 0x0004C8D0
public static NumberFormatInfo CurrentInfo
{
get
{
NumberFormatInfo numberFormat = Thread.CurrentThread.CurrentCulture.NumberFormat;
numberFormat.isReadOnly = true;
return numberFormat;
}
}
/// <summary>Gets the default read-only <see cref="T:System.Globalization.NumberFormatInfo" /> that is culture-independent (invariant).</summary>
/// <returns>The default read-only <see cref="T:System.Globalization.NumberFormatInfo" /> that is culture-independent (invariant).</returns>
// Token: 0x1700037D RID: 893
// (get) Token: 0x06001436 RID: 5174 RVA: 0x0004E6F8 File Offset: 0x0004C8F8
public static NumberFormatInfo InvariantInfo
{
get
{
return new NumberFormatInfo
{
NumberNegativePattern = 1,
isReadOnly = true
};
}
}
/// <summary>Gets a value indicating whether the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only.</summary>
/// <returns>true if the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only; otherwise, false.</returns>
// Token: 0x1700037E RID: 894
// (get) Token: 0x06001437 RID: 5175 RVA: 0x0004E71C File Offset: 0x0004C91C
public bool IsReadOnly
{
get
{
return this.isReadOnly;
}
}
/// <summary>Gets or sets the string that represents the IEEE NaN (not a number) value.</summary>
/// <returns>The string that represents the IEEE NaN (not a number) value. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is "NaN".</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
// Token: 0x1700037F RID: 895
// (get) Token: 0x06001438 RID: 5176 RVA: 0x0004E724 File Offset: 0x0004C924
// (set) Token: 0x06001439 RID: 5177 RVA: 0x0004E72C File Offset: 0x0004C92C
public string NaNSymbol
{
get
{
return this.nanSymbol;
}
set
{
if (value == null)
{
throw new ArgumentNullException("The value specified for the property is a null reference");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
this.nanSymbol = value;
}
}
/// <summary>Gets or sets the string that represents negative infinity.</summary>
/// <returns>The string that represents negative infinity. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is "-Infinity".</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
// Token: 0x17000380 RID: 896
// (get) Token: 0x0600143A RID: 5178 RVA: 0x0004E768 File Offset: 0x0004C968
// (set) Token: 0x0600143B RID: 5179 RVA: 0x0004E770 File Offset: 0x0004C970
public string NegativeInfinitySymbol
{
get
{
return this.negativeInfinitySymbol;
}
set
{
if (value == null)
{
throw new ArgumentNullException("The value specified for the property is a null reference");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
this.negativeInfinitySymbol = value;
}
}
/// <summary>Gets or sets the string that denotes that the associated number is negative.</summary>
/// <returns>The string that denotes that the associated number is negative. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is "-".</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
// Token: 0x17000381 RID: 897
// (get) Token: 0x0600143C RID: 5180 RVA: 0x0004E7AC File Offset: 0x0004C9AC
// (set) Token: 0x0600143D RID: 5181 RVA: 0x0004E7B4 File Offset: 0x0004C9B4
public string NegativeSign
{
get
{
return this.negativeSign;
}
set
{
if (value == null)
{
throw new ArgumentNullException("The value specified for the property is a null reference");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
this.negativeSign = value;
}
}
/// <summary>Gets or sets the number of decimal places to use in numeric values.</summary>
/// <returns>The number of decimal places to use in numeric values. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is 2.</returns>
/// <exception cref="T:System.ArgumentOutOfRangeException">The property is being set to a value that is less than 0 or greater than 99. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
// Token: 0x17000382 RID: 898
// (get) Token: 0x0600143E RID: 5182 RVA: 0x0004E7F0 File Offset: 0x0004C9F0
// (set) Token: 0x0600143F RID: 5183 RVA: 0x0004E7F8 File Offset: 0x0004C9F8
public int NumberDecimalDigits
{
get
{
return this.numberDecimalDigits;
}
set
{
if (value < 0 || value > 99)
{
throw new ArgumentOutOfRangeException("The value specified for the property is less than 0 or greater than 99");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
this.numberDecimalDigits = value;
}
}
/// <summary>Gets or sets the string to use as the decimal separator in numeric values.</summary>
/// <returns>The string to use as the decimal separator in numeric values. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is ".".</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
/// <exception cref="T:System.ArgumentException">The property is being set to an empty string.</exception>
// Token: 0x17000383 RID: 899
// (get) Token: 0x06001440 RID: 5184 RVA: 0x0004E834 File Offset: 0x0004CA34
// (set) Token: 0x06001441 RID: 5185 RVA: 0x0004E83C File Offset: 0x0004CA3C
public string NumberDecimalSeparator
{
get
{
return this.numberDecimalSeparator;
}
set
{
if (value == null)
{
throw new ArgumentNullException("The value specified for the property is a null reference");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
this.numberDecimalSeparator = value;
}
}
/// <summary>Gets or sets the string that separates groups of digits to the left of the decimal in numeric values.</summary>
/// <returns>The string that separates groups of digits to the left of the decimal in numeric values. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is ",".</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
// Token: 0x17000384 RID: 900
// (get) Token: 0x06001442 RID: 5186 RVA: 0x0004E878 File Offset: 0x0004CA78
// (set) Token: 0x06001443 RID: 5187 RVA: 0x0004E880 File Offset: 0x0004CA80
public string NumberGroupSeparator
{
get
{
return this.numberGroupSeparator;
}
set
{
if (value == null)
{
throw new ArgumentNullException("The value specified for the property is a null reference");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
this.numberGroupSeparator = value;
}
}
/// <summary>Gets or sets the number of digits in each group to the left of the decimal in numeric values.</summary>
/// <returns>The number of digits in each group to the left of the decimal in numeric values. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is a one-dimensional array with only one element, which is set to 3.</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.ArgumentException">The property is being set and the array contains an entry that is less than 0 or greater than 9.-or- The property is being set and the array contains an entry, other than the last entry, that is set to 0. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
// Token: 0x17000385 RID: 901
// (get) Token: 0x06001444 RID: 5188 RVA: 0x0004E8BC File Offset: 0x0004CABC
// (set) Token: 0x06001445 RID: 5189 RVA: 0x0004E8D0 File Offset: 0x0004CAD0
public int[] NumberGroupSizes
{
get
{
return (int[])this.RawNumberGroupSizes.Clone();
}
set
{
this.RawNumberGroupSizes = value;
}
}
// Token: 0x17000386 RID: 902
// (get) Token: 0x06001446 RID: 5190 RVA: 0x0004E8DC File Offset: 0x0004CADC
// (set) Token: 0x06001447 RID: 5191 RVA: 0x0004E8E4 File Offset: 0x0004CAE4
internal int[] RawNumberGroupSizes
{
get
{
return this.numberGroupSizes;
}
set
{
if (value == null)
{
throw new ArgumentNullException("The value specified for the property is a null reference");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
if (value.Length == 0)
{
this.numberGroupSizes = new int[0];
return;
}
int num = value.Length - 1;
for (int i = 0; i < num; i++)
{
if (value[i] < 1 || value[i] > 9)
{
throw new ArgumentOutOfRangeException("One of the elements in the array specified is not between 1 and 9");
}
}
if (value[num] < 0 || value[num] > 9)
{
throw new ArgumentOutOfRangeException("Last element in the array specified is not between 0 and 9");
}
this.numberGroupSizes = (int[])value.Clone();
}
}
/// <summary>Gets or sets the format pattern for negative numeric values.</summary>
/// <returns>The format pattern for negative numeric values. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is 1, which represents "-n", where <paramref name="n" /> is a number.</returns>
/// <exception cref="T:System.ArgumentOutOfRangeException">The property is being set to a value that is less than 0 or greater than 4. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
// Token: 0x17000387 RID: 903
// (get) Token: 0x06001448 RID: 5192 RVA: 0x0004E994 File Offset: 0x0004CB94
// (set) Token: 0x06001449 RID: 5193 RVA: 0x0004E99C File Offset: 0x0004CB9C
public int NumberNegativePattern
{
get
{
return this.numberNegativePattern;
}
set
{
if (value < 0 || value > 4)
{
throw new ArgumentOutOfRangeException("The value specified for the property is less than 0 or greater than 15");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
this.numberNegativePattern = value;
}
}
/// <summary>Gets or sets the number of decimal places to use in percent values. </summary>
/// <returns>The number of decimal places to use in percent values. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is 2.</returns>
/// <exception cref="T:System.ArgumentOutOfRangeException">The property is being set to a value that is less than 0 or greater than 99. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
// Token: 0x17000388 RID: 904
// (get) Token: 0x0600144A RID: 5194 RVA: 0x0004E9E0 File Offset: 0x0004CBE0
// (set) Token: 0x0600144B RID: 5195 RVA: 0x0004E9E8 File Offset: 0x0004CBE8
public int PercentDecimalDigits
{
get
{
return this.percentDecimalDigits;
}
set
{
if (value < 0 || value > 99)
{
throw new ArgumentOutOfRangeException("The value specified for the property is less than 0 or greater than 99");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
this.percentDecimalDigits = value;
}
}
/// <summary>Gets or sets the string to use as the decimal separator in percent values. </summary>
/// <returns>The string to use as the decimal separator in percent values. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is ".".</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
/// <exception cref="T:System.ArgumentException">The property is being set to an empty string.</exception>
// Token: 0x17000389 RID: 905
// (get) Token: 0x0600144C RID: 5196 RVA: 0x0004EA24 File Offset: 0x0004CC24
// (set) Token: 0x0600144D RID: 5197 RVA: 0x0004EA2C File Offset: 0x0004CC2C
public string PercentDecimalSeparator
{
get
{
return this.percentDecimalSeparator;
}
set
{
if (value == null)
{
throw new ArgumentNullException("The value specified for the property is a null reference");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
this.percentDecimalSeparator = value;
}
}
/// <summary>Gets or sets the string that separates groups of digits to the left of the decimal in percent values. </summary>
/// <returns>The string that separates groups of digits to the left of the decimal in percent values. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is ",".</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
// Token: 0x1700038A RID: 906
// (get) Token: 0x0600144E RID: 5198 RVA: 0x0004EA68 File Offset: 0x0004CC68
// (set) Token: 0x0600144F RID: 5199 RVA: 0x0004EA70 File Offset: 0x0004CC70
public string PercentGroupSeparator
{
get
{
return this.percentGroupSeparator;
}
set
{
if (value == null)
{
throw new ArgumentNullException("The value specified for the property is a null reference");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
this.percentGroupSeparator = value;
}
}
/// <summary>Gets or sets the number of digits in each group to the left of the decimal in percent values. </summary>
/// <returns>The number of digits in each group to the left of the decimal in percent values. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is a one-dimensional array with only one element, which is set to 3.</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.ArgumentException">The property is being set and the array contains an entry that is less than 0 or greater than 9.-or- The property is being set and the array contains an entry, other than the last entry, that is set to 0. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
// Token: 0x1700038B RID: 907
// (get) Token: 0x06001450 RID: 5200 RVA: 0x0004EAAC File Offset: 0x0004CCAC
// (set) Token: 0x06001451 RID: 5201 RVA: 0x0004EAC0 File Offset: 0x0004CCC0
public int[] PercentGroupSizes
{
get
{
return (int[])this.RawPercentGroupSizes.Clone();
}
set
{
this.RawPercentGroupSizes = value;
}
}
// Token: 0x1700038C RID: 908
// (get) Token: 0x06001452 RID: 5202 RVA: 0x0004EACC File Offset: 0x0004CCCC
// (set) Token: 0x06001453 RID: 5203 RVA: 0x0004EAD4 File Offset: 0x0004CCD4
internal int[] RawPercentGroupSizes
{
get
{
return this.percentGroupSizes;
}
set
{
if (value == null)
{
throw new ArgumentNullException("The value specified for the property is a null reference");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
if (this == CultureInfo.CurrentCulture.NumberFormat)
{
throw new Exception("HERE the value was modified");
}
if (value.Length == 0)
{
this.percentGroupSizes = new int[0];
return;
}
int num = value.Length - 1;
for (int i = 0; i < num; i++)
{
if (value[i] < 1 || value[i] > 9)
{
throw new ArgumentOutOfRangeException("One of the elements in the array specified is not between 1 and 9");
}
}
if (value[num] < 0 || value[num] > 9)
{
throw new ArgumentOutOfRangeException("Last element in the array specified is not between 0 and 9");
}
this.percentGroupSizes = (int[])value.Clone();
}
}
/// <summary>Gets or sets the format pattern for negative percent values.</summary>
/// <returns>The format pattern for negative percent values. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is 0, which represents "-n %", where "%" is the <see cref="P:System.Globalization.NumberFormatInfo.PercentSymbol" /> and <paramref name="n" /> is a number.</returns>
/// <exception cref="T:System.ArgumentOutOfRangeException">The property is being set to a value that is less than 0 or greater than 11. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
// Token: 0x1700038D RID: 909
// (get) Token: 0x06001454 RID: 5204 RVA: 0x0004EBA0 File Offset: 0x0004CDA0
// (set) Token: 0x06001455 RID: 5205 RVA: 0x0004EBA8 File Offset: 0x0004CDA8
public int PercentNegativePattern
{
get
{
return this.percentNegativePattern;
}
set
{
if (value < 0 || value > 2)
{
throw new ArgumentOutOfRangeException("The value specified for the property is less than 0 or greater than 15");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
this.percentNegativePattern = value;
}
}
/// <summary>Gets or sets the format pattern for positive percent values.</summary>
/// <returns>The format pattern for positive percent values. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is 0, which represents "n %", where "%" is the <see cref="P:System.Globalization.NumberFormatInfo.PercentSymbol" /> and <paramref name="n" /> is a number.</returns>
/// <exception cref="T:System.ArgumentOutOfRangeException">The property is being set to a value that is less than 0 or greater than 3. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
// Token: 0x1700038E RID: 910
// (get) Token: 0x06001456 RID: 5206 RVA: 0x0004EBEC File Offset: 0x0004CDEC
// (set) Token: 0x06001457 RID: 5207 RVA: 0x0004EBF4 File Offset: 0x0004CDF4
public int PercentPositivePattern
{
get
{
return this.percentPositivePattern;
}
set
{
if (value < 0 || value > 2)
{
throw new ArgumentOutOfRangeException("The value specified for the property is less than 0 or greater than 3");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
this.percentPositivePattern = value;
}
}
/// <summary>Gets or sets the string to use as the percent symbol.</summary>
/// <returns>The string to use as the percent symbol. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is "%".</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
// Token: 0x1700038F RID: 911
// (get) Token: 0x06001458 RID: 5208 RVA: 0x0004EC38 File Offset: 0x0004CE38
// (set) Token: 0x06001459 RID: 5209 RVA: 0x0004EC40 File Offset: 0x0004CE40
public string PercentSymbol
{
get
{
return this.percentSymbol;
}
set
{
if (value == null)
{
throw new ArgumentNullException("The value specified for the property is a null reference");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
this.percentSymbol = value;
}
}
/// <summary>Gets or sets the string to use as the per mille symbol.</summary>
/// <returns>The string to use as the per mille symbol. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is "‰", which is the Unicode character U+2030.</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
// Token: 0x17000390 RID: 912
// (get) Token: 0x0600145A RID: 5210 RVA: 0x0004EC7C File Offset: 0x0004CE7C
// (set) Token: 0x0600145B RID: 5211 RVA: 0x0004EC84 File Offset: 0x0004CE84
public string PerMilleSymbol
{
get
{
return this.perMilleSymbol;
}
set
{
if (value == null)
{
throw new ArgumentNullException("The value specified for the property is a null reference");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
this.perMilleSymbol = value;
}
}
/// <summary>Gets or sets the string that represents positive infinity.</summary>
/// <returns>The string that represents positive infinity. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is "Infinity".</returns>
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
// Token: 0x17000391 RID: 913
// (get) Token: 0x0600145C RID: 5212 RVA: 0x0004ECC0 File Offset: 0x0004CEC0
// (set) Token: 0x0600145D RID: 5213 RVA: 0x0004ECC8 File Offset: 0x0004CEC8
public string PositiveInfinitySymbol
{
get
{
return this.positiveInfinitySymbol;
}
set
{
if (value == null)
{
throw new ArgumentNullException("The value specified for the property is a null reference");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
this.positiveInfinitySymbol = value;
}
}
/// <summary>Gets or sets the string that denotes that the associated number is positive.</summary>
/// <returns>The string that denotes that the associated number is positive. The default for <see cref="P:System.Globalization.NumberFormatInfo.InvariantInfo" /> is "+".</returns>
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.NumberFormatInfo" /> is read-only. </exception>
// Token: 0x17000392 RID: 914
// (get) Token: 0x0600145E RID: 5214 RVA: 0x0004ED04 File Offset: 0x0004CF04
// (set) Token: 0x0600145F RID: 5215 RVA: 0x0004ED0C File Offset: 0x0004CF0C
public string PositiveSign
{
get
{
return this.positiveSign;
}
set
{
if (value == null)
{
throw new ArgumentNullException("The value specified for the property is a null reference");
}
if (this.isReadOnly)
{
throw new InvalidOperationException("The current instance is read-only and a set operation was attempted");
}
this.positiveSign = value;
}
}
/// <summary>Gets an object of the specified type that provides a number formatting service.</summary>
/// <returns>The current <see cref="T:System.Globalization.NumberFormatInfo" />, if <paramref name="formatType" /> is the same as the type of the current <see cref="T:System.Globalization.NumberFormatInfo" />; otherwise, null.</returns>
/// <param name="formatType">The <see cref="T:System.Type" /> of the required formatting service. </param>
// Token: 0x06001460 RID: 5216 RVA: 0x0004ED48 File Offset: 0x0004CF48
public object GetFormat(Type formatType)
{
return (formatType != typeof(NumberFormatInfo)) ? null : this;
}
/// <summary>Creates a shallow copy of the <see cref="T:System.Globalization.NumberFormatInfo" />.</summary>
/// <returns>A new <see cref="T:System.Globalization.NumberFormatInfo" /> copied from the original <see cref="T:System.Globalization.NumberFormatInfo" />.</returns>
// Token: 0x06001461 RID: 5217 RVA: 0x0004ED64 File Offset: 0x0004CF64
public object Clone()
{
NumberFormatInfo numberFormatInfo = (NumberFormatInfo)base.MemberwiseClone();
numberFormatInfo.isReadOnly = false;
return numberFormatInfo;
}
/// <summary>Returns a read-only <see cref="T:System.Globalization.NumberFormatInfo" /> wrapper.</summary>
/// <returns>A read-only <see cref="T:System.Globalization.NumberFormatInfo" /> wrapper around <paramref name="nfi" />.</returns>
/// <param name="nfi">The <see cref="T:System.Globalization.NumberFormatInfo" /> to wrap. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="nfi" /> is null. </exception>
// Token: 0x06001462 RID: 5218 RVA: 0x0004ED88 File Offset: 0x0004CF88
public static NumberFormatInfo ReadOnly(NumberFormatInfo nfi)
{
NumberFormatInfo numberFormatInfo = (NumberFormatInfo)nfi.Clone();
numberFormatInfo.isReadOnly = true;
return numberFormatInfo;
}
/// <summary>Gets the <see cref="T:System.Globalization.NumberFormatInfo" /> associated with the specified <see cref="T:System.IFormatProvider" />.</summary>
/// <returns>The <see cref="T:System.Globalization.NumberFormatInfo" /> associated with the specified <see cref="T:System.IFormatProvider" />.</returns>
/// <param name="formatProvider">The <see cref="T:System.IFormatProvider" /> used to get the <see cref="T:System.Globalization.NumberFormatInfo" />.-or- null to get <see cref="P:System.Globalization.NumberFormatInfo.CurrentInfo" />. </param>
// Token: 0x06001463 RID: 5219 RVA: 0x0004EDAC File Offset: 0x0004CFAC
public static NumberFormatInfo GetInstance(IFormatProvider formatProvider)
{
if (formatProvider != null)
{
NumberFormatInfo numberFormatInfo = (NumberFormatInfo)formatProvider.GetFormat(typeof(NumberFormatInfo));
if (numberFormatInfo != null)
{
return numberFormatInfo;
}
}
return NumberFormatInfo.CurrentInfo;
}
// Token: 0x0400058E RID: 1422
private bool isReadOnly;
// Token: 0x0400058F RID: 1423
private string decimalFormats;
// Token: 0x04000590 RID: 1424
private string currencyFormats;
// Token: 0x04000591 RID: 1425
private string percentFormats;
// Token: 0x04000592 RID: 1426
private string digitPattern = "#";
// Token: 0x04000593 RID: 1427
private string zeroPattern = "0";
// Token: 0x04000594 RID: 1428
private int currencyDecimalDigits;
// Token: 0x04000595 RID: 1429
private string currencyDecimalSeparator;
// Token: 0x04000596 RID: 1430
private string currencyGroupSeparator;
// Token: 0x04000597 RID: 1431
private int[] currencyGroupSizes;
// Token: 0x04000598 RID: 1432
private int currencyNegativePattern;
// Token: 0x04000599 RID: 1433
private int currencyPositivePattern;
// Token: 0x0400059A RID: 1434
private string currencySymbol;
// Token: 0x0400059B RID: 1435
private string nanSymbol;
// Token: 0x0400059C RID: 1436
private string negativeInfinitySymbol;
// Token: 0x0400059D RID: 1437
private string negativeSign;
// Token: 0x0400059E RID: 1438
private int numberDecimalDigits;
// Token: 0x0400059F RID: 1439
private string numberDecimalSeparator;
// Token: 0x040005A0 RID: 1440
private string numberGroupSeparator;
// Token: 0x040005A1 RID: 1441
private int[] numberGroupSizes;
// Token: 0x040005A2 RID: 1442
private int numberNegativePattern;
// Token: 0x040005A3 RID: 1443
private int percentDecimalDigits;
// Token: 0x040005A4 RID: 1444
private string percentDecimalSeparator;
// Token: 0x040005A5 RID: 1445
private string percentGroupSeparator;
// Token: 0x040005A6 RID: 1446
private int[] percentGroupSizes;
// Token: 0x040005A7 RID: 1447
private int percentNegativePattern;
// Token: 0x040005A8 RID: 1448
private int percentPositivePattern;
// Token: 0x040005A9 RID: 1449
private string percentSymbol;
// Token: 0x040005AA RID: 1450
private string perMilleSymbol;
// Token: 0x040005AB RID: 1451
private string positiveInfinitySymbol;
// Token: 0x040005AC RID: 1452
private string positiveSign;
// Token: 0x040005AD RID: 1453
private string ansiCurrencySymbol;
// Token: 0x040005AE RID: 1454
private int m_dataItem;
// Token: 0x040005AF RID: 1455
private bool m_useUserOverride;
// Token: 0x040005B0 RID: 1456
private bool validForParseAsNumber;
// Token: 0x040005B1 RID: 1457
private bool validForParseAsCurrency;
// Token: 0x040005B2 RID: 1458
private string[] nativeDigits = NumberFormatInfo.invariantNativeDigits;
// Token: 0x040005B3 RID: 1459
private int digitSubstitution = 1;
// Token: 0x040005B4 RID: 1460
private static readonly string[] invariantNativeDigits = new string[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" };
}
}
@@ -0,0 +1,65 @@
using System;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Determines the styles permitted in numeric string arguments that are passed to the Parse and TryParse methods of the integral and floating-point numeric types.</summary>
// Token: 0x02000193 RID: 403
[ComVisible(true)]
[Flags]
[Serializable]
public enum NumberStyles
{
/// <summary>Indicates that no style elements, such as leading or trailing white space, thousands separators, or a decimal separator, can be present in the parsed string. The string to be parsed must consist of integral decimal digits only. </summary>
// Token: 0x040005B6 RID: 1462
None = 0,
/// <summary>Indicates that leading white-space characters can be present in the parsed string. Valid white-space characters have the Unicode values U+0009, U+000A, U+000B, U+000C, U+000D, and U+0020. Note that this is a subset of the characters for which the <see cref="M:System.Char.IsWhiteSpace(System.Char)" /> method returns true.</summary>
// Token: 0x040005B7 RID: 1463
AllowLeadingWhite = 1,
/// <summary>Indicates that trailing white-space characters can be present in the parsed string. Valid white-space characters have the Unicode values U+0009, U+000A, U+000B, U+000C, U+000D, and U+0020. Note that this is a subset of the characters for which the <see cref="M:System.Char.IsWhiteSpace(System.Char)" /> method returns true.</summary>
// Token: 0x040005B8 RID: 1464
AllowTrailingWhite = 2,
/// <summary>Indicates that the numeric string can have a leading sign. Valid leading sign characters are determined by the <see cref="P:System.Globalization.NumberFormatInfo.PositiveSign" /> and <see cref="P:System.Globalization.NumberFormatInfo.NegativeSign" /> properties.</summary>
// Token: 0x040005B9 RID: 1465
AllowLeadingSign = 4,
/// <summary>Indicates that the numeric string can have a trailing sign. Valid trailing sign characters are determined by the <see cref="P:System.Globalization.NumberFormatInfo.PositiveSign" /> and <see cref="P:System.Globalization.NumberFormatInfo.NegativeSign" /> properties.</summary>
// Token: 0x040005BA RID: 1466
AllowTrailingSign = 8,
/// <summary>Indicates that the numeric string can have one pair of parentheses enclosing the number. The parentheses indicate that the string to be parsed represents a negative number.</summary>
// Token: 0x040005BB RID: 1467
AllowParentheses = 16,
/// <summary>Indicates that the numeric string can have a decimal point. If the <see cref="T:System.Globalization.NumberStyles" /> value includes the <see cref="F:System.Globalization.NumberStyles.AllowCurrencySymbol" /> flag and the parsed string includes a currency symbol, the decimal separator character is determined by the <see cref="P:System.Globalization.NumberFormatInfo.CurrencyDecimalSeparator" /> property. Otherwise, the decimal separator character is determined by the <see cref="P:System.Globalization.NumberFormatInfo.NumberDecimalSeparator" /> property.</summary>
// Token: 0x040005BC RID: 1468
AllowDecimalPoint = 32,
/// <summary>Indicates that the numeric string can have group separators, such as symbols that separate hundreds from thousands. If the <see cref="T:System.Globalization.NumberStyles" /> value includes the <see cref="F:System.Globalization.NumberStyles.AllowCurrencySymbol" /> flag and the string to be parsed includes a currency symbol, the valid group separator character is determined by the <see cref="P:System.Globalization.NumberFormatInfo.CurrencyGroupSeparator" /> property, and the number of digits in each group is determined by the <see cref="P:System.Globalization.NumberFormatInfo.CurrencyGroupSizes" /> property. Otherwise, the valid group separator character is determined by the <see cref="P:System.Globalization.NumberFormatInfo.NumberGroupSeparator" /> property, and the number of digits in each group is determined by the <see cref="P:System.Globalization.NumberFormatInfo.NumberGroupSizes" /> property.</summary>
// Token: 0x040005BD RID: 1469
AllowThousands = 64,
/// <summary>Indicates that the numeric string can be in exponential notation. The <see cref="F:System.Globalization.NumberStyles.AllowExponent" /> flag allows the parsed string to contain an exponent that begins with the "E" or "e" character and that is followed by an optional positive or negative sign and an integer. In other words, it successfully parses strings in the form nnnExx, nnnE+xx, and nnnE-xx. It does not allow a decimal separator or sign in the significand or mantissa; to allow these elements in the string to be parsed, use the <see cref="F:System.Globalization.NumberStyles.AllowDecimalPoint" /> and <see cref="F:System.Globalization.NumberStyles.AllowLeadingSign" /> flags, or use a composite style that includes these individual flags.</summary>
// Token: 0x040005BE RID: 1470
AllowExponent = 128,
/// <summary>Indicates that the numeric string can contain a currency symbol. Valid currency symbols are determined by the <see cref="P:System.Globalization.NumberFormatInfo.CurrencySymbol" /> property.</summary>
// Token: 0x040005BF RID: 1471
AllowCurrencySymbol = 256,
/// <summary>Indicates that the numeric string represents a hexadecimal value. Valid hexadecimal values include the numeric digits 0-9 and the hexadecimal digits A-F and a-f. Strings that are parsed using this style cannot be prefixed with "0x" or "&amp;h". A string that is parsed with the <see cref="F:System.Globalization.NumberStyles.AllowHexSpecifier" /> style will always be interpreted as a hexadecimal value. The only flags that can be combined with <see cref="F:System.Globalization.NumberStyles.AllowHexSpecifier" /> are <see cref="F:System.Globalization.NumberStyles.AllowLeadingWhite" /> and <see cref="F:System.Globalization.NumberStyles.AllowTrailingWhite" />. The <see cref="T:System.Globalization.NumberStyles" /> enumeration includes a composite style, <see cref="F:System.Globalization.NumberStyles.HexNumber" />, that consists of these three flags.</summary>
// Token: 0x040005C0 RID: 1472
AllowHexSpecifier = 512,
/// <summary>Indicates that the <see cref="F:System.Globalization.NumberStyles.AllowLeadingWhite" />, <see cref="F:System.Globalization.NumberStyles.AllowTrailingWhite" />, and <see cref="F:System.Globalization.NumberStyles.AllowLeadingSign" /> styles are used. This is a composite number style.</summary>
// Token: 0x040005C1 RID: 1473
Integer = 7,
/// <summary>Indicates that the <see cref="F:System.Globalization.NumberStyles.AllowLeadingWhite" />, <see cref="F:System.Globalization.NumberStyles.AllowTrailingWhite" />, and <see cref="F:System.Globalization.NumberStyles.AllowHexSpecifier" /> styles are used. This is a composite number style.</summary>
// Token: 0x040005C2 RID: 1474
HexNumber = 515,
/// <summary>Indicates that the <see cref="F:System.Globalization.NumberStyles.AllowLeadingWhite" />, <see cref="F:System.Globalization.NumberStyles.AllowTrailingWhite" />, <see cref="F:System.Globalization.NumberStyles.AllowLeadingSign" />, <see cref="F:System.Globalization.NumberStyles.AllowTrailingSign" />, <see cref="F:System.Globalization.NumberStyles.AllowDecimalPoint" />, and <see cref="F:System.Globalization.NumberStyles.AllowThousands" /> styles are used. This is a composite number style.</summary>
// Token: 0x040005C3 RID: 1475
Number = 111,
/// <summary>Indicates that the <see cref="F:System.Globalization.NumberStyles.AllowLeadingWhite" />, <see cref="F:System.Globalization.NumberStyles.AllowTrailingWhite" />, <see cref="F:System.Globalization.NumberStyles.AllowLeadingSign" />, <see cref="F:System.Globalization.NumberStyles.AllowDecimalPoint" />, and <see cref="F:System.Globalization.NumberStyles.AllowExponent" /> styles are used. This is a composite number style.</summary>
// Token: 0x040005C4 RID: 1476
Float = 167,
/// <summary>Indicates that all styles except <see cref="F:System.Globalization.NumberStyles.AllowExponent" /> and <see cref="F:System.Globalization.NumberStyles.AllowHexSpecifier" /> are used. This is a composite number style.</summary>
// Token: 0x040005C5 RID: 1477
Currency = 383,
/// <summary>Indicates that all styles except <see cref="F:System.Globalization.NumberStyles.AllowHexSpecifier" /> are used. This is a composite number style.</summary>
// Token: 0x040005C6 RID: 1478
Any = 511
}
}
@@ -0,0 +1,493 @@
using System;
namespace System.Globalization
{
/// <summary>Represents the Persian calendar.</summary>
// Token: 0x02000194 RID: 404
[Serializable]
public class PersianCalendar : Calendar
{
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.PersianCalendar" /> class. </summary>
// Token: 0x06001464 RID: 5220 RVA: 0x0004EDE4 File Offset: 0x0004CFE4
public PersianCalendar()
{
this.M_AbbrEraNames = new string[] { "A.P." };
this.M_EraNames = new string[] { "Anno Persico" };
if (this.twoDigitYearMax == 99)
{
this.twoDigitYearMax = 1410;
}
}
/// <summary>Gets the list of eras in a <see cref="T:System.Globalization.PersianCalendar" /> object.</summary>
/// <returns>An array of integers that represents the eras in a <see cref="T:System.Globalization.PersianCalendar" /> object. The array consists of a single element having a value of <see cref="F:System.Globalization.PersianCalendar.PersianEra" />.</returns>
// Token: 0x17000393 RID: 915
// (get) Token: 0x06001466 RID: 5222 RVA: 0x0004EE7C File Offset: 0x0004D07C
public override int[] Eras
{
get
{
return new int[] { PersianCalendar.PersianEra };
}
}
/// <summary>Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.</summary>
/// <returns>The last year of a 100-year range that can be represented by a 2-digit year.</returns>
/// <exception cref="T:System.InvalidOperationException">This calendar is read-only.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">The value in a set operation is less than 100 or greater than 9378.</exception>
// Token: 0x17000394 RID: 916
// (get) Token: 0x06001467 RID: 5223 RVA: 0x0004EE8C File Offset: 0x0004D08C
// (set) Token: 0x06001468 RID: 5224 RVA: 0x0004EE94 File Offset: 0x0004D094
public override int TwoDigitYearMax
{
get
{
return this.twoDigitYearMax;
}
set
{
base.CheckReadOnly();
base.M_ArgumentInRange("value", value, 100, this.M_MaxYear);
this.twoDigitYearMax = value;
}
}
// Token: 0x06001469 RID: 5225 RVA: 0x0004EEC4 File Offset: 0x0004D0C4
internal void M_CheckDateTime(DateTime time)
{
if (time.Ticks < 196036416000000000L)
{
throw new ArgumentOutOfRangeException("time", "Only positive Persian years are supported.");
}
}
// Token: 0x0600146A RID: 5226 RVA: 0x0004EEEC File Offset: 0x0004D0EC
internal void M_CheckEra(ref int era)
{
if (era == 0)
{
era = PersianCalendar.PersianEra;
}
if (era != PersianCalendar.PersianEra)
{
throw new ArgumentException("Era value was not valid.");
}
}
// Token: 0x0600146B RID: 5227 RVA: 0x0004EF14 File Offset: 0x0004D114
internal override void M_CheckYE(int year, ref int era)
{
this.M_CheckEra(ref era);
if (year < 1 || year > this.M_MaxYear)
{
throw new ArgumentOutOfRangeException("year", "Only Persian years between 1 and 9378, inclusive, are supported.");
}
}
// Token: 0x0600146C RID: 5228 RVA: 0x0004EF4C File Offset: 0x0004D14C
internal void M_CheckYME(int year, int month, ref int era)
{
this.M_CheckYE(year, ref era);
if (month < 1 || month > 12)
{
throw new ArgumentOutOfRangeException("month", "Month must be between one and twelve.");
}
if (year == this.M_MaxYear && month > 10)
{
throw new ArgumentOutOfRangeException("month", "Months in year 9378 must be between one and ten.");
}
}
// Token: 0x0600146D RID: 5229 RVA: 0x0004EFA4 File Offset: 0x0004D1A4
internal void M_CheckYMDE(int year, int month, int day, ref int era)
{
this.M_CheckYME(year, month, ref era);
base.M_ArgumentInRange("day", day, 1, this.GetDaysInMonth(year, month, era));
if (year == this.M_MaxYear && month == 10 && day > 10)
{
throw new ArgumentOutOfRangeException("day", "Days in month 10 of year 9378 must be between one and ten.");
}
}
// Token: 0x0600146E RID: 5230 RVA: 0x0004F000 File Offset: 0x0004D200
internal int fixed_from_dmy(int day, int month, int year)
{
int num = 226894;
num += 365 * (year - 1);
num += (8 * year + 21) / 33;
if (month <= 7)
{
num += 31 * (month - 1);
}
else
{
num += 30 * (month - 1) + 6;
}
return num + day;
}
// Token: 0x0600146F RID: 5231 RVA: 0x0004F050 File Offset: 0x0004D250
internal int year_from_fixed(int date)
{
return (33 * (date - 226895) + 3) / 12053 + 1;
}
// Token: 0x06001470 RID: 5232 RVA: 0x0004F068 File Offset: 0x0004D268
internal void my_from_fixed(out int month, out int year, int date)
{
year = this.year_from_fixed(date);
int num = date - this.fixed_from_dmy(1, 1, year);
if (num < 216)
{
month = num / 31 + 1;
}
else
{
month = (num - 6) / 30 + 1;
}
}
// Token: 0x06001471 RID: 5233 RVA: 0x0004F0B0 File Offset: 0x0004D2B0
internal void dmy_from_fixed(out int day, out int month, out int year, int date)
{
year = this.year_from_fixed(date);
day = date - this.fixed_from_dmy(1, 1, year);
if (day < 216)
{
month = day / 31 + 1;
day = day % 31 + 1;
}
else
{
month = (day - 6) / 30 + 1;
day = (day - 6) % 30 + 1;
}
}
// Token: 0x06001472 RID: 5234 RVA: 0x0004F110 File Offset: 0x0004D310
internal bool is_leap_year(int year)
{
return (25 * year + 11) % 33 < 8;
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is offset the specified number of months from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>A <see cref="T:System.DateTime" /> that represents the date yielded by adding the number of months specified by the <paramref name="months" /> parameter to the date specified by the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add months. </param>
/// <param name="months">The positive or negative number of months to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="months" /> is less than -120,000 or greater than 120,000. </exception>
// Token: 0x06001473 RID: 5235 RVA: 0x0004F120 File Offset: 0x0004D320
public override DateTime AddMonths(DateTime time, int months)
{
int num = CCFixed.FromDateTime(time);
int num2;
int num3;
int num4;
this.dmy_from_fixed(out num2, out num3, out num4, num);
num3 += months;
num4 += CCMath.div_mod(out num3, num3, 12);
num = this.fixed_from_dmy(num2, num3, num4);
DateTime dateTime = CCFixed.ToDateTime(num).Add(time.TimeOfDay);
this.M_CheckDateTime(dateTime);
return dateTime;
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is offset the specified number of years from the specified <see cref="T:System.DateTime" /> object.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of years to the specified <see cref="T:System.DateTime" /> object.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add years. </param>
/// <param name="years">The positive or negative number of years to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="years" /> is less than -10,000 or greater than 10,000. </exception>
// Token: 0x06001474 RID: 5236 RVA: 0x0004F180 File Offset: 0x0004D380
public override DateTime AddYears(DateTime time, int years)
{
int num = CCFixed.FromDateTime(time);
int num2;
int num3;
int num4;
this.dmy_from_fixed(out num2, out num3, out num4, num);
num4 += years;
num = this.fixed_from_dmy(num2, num3, num4);
DateTime dateTime = CCFixed.ToDateTime(num).Add(time.TimeOfDay);
this.M_CheckDateTime(dateTime);
return dateTime;
}
/// <summary>Returns the day of the month in the specified <see cref="T:System.DateTime" /> object.</summary>
/// <returns>An integer from 1 through 31 that represents the day of the month in the specified <see cref="T:System.DateTime" /> object.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="time" /> parameter represents a date less than <see cref="P:System.Globalization.PersianCalendar.MinSupportedDateTime" /> or greater than <see cref="P:System.Globalization.PersianCalendar.MaxSupportedDateTime" />.</exception>
// Token: 0x06001475 RID: 5237 RVA: 0x0004F1D4 File Offset: 0x0004D3D4
public override int GetDayOfMonth(DateTime time)
{
this.M_CheckDateTime(time);
int num = CCFixed.FromDateTime(time);
int num2;
int num3;
int num4;
this.dmy_from_fixed(out num2, out num3, out num4, num);
return num2;
}
/// <summary>Returns the day of the week in the specified <see cref="T:System.DateTime" /> object.</summary>
/// <returns>A <see cref="T:System.DayOfWeek" /> value that represents the day of the week in the specified <see cref="T:System.DateTime" /> object.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x06001476 RID: 5238 RVA: 0x0004F200 File Offset: 0x0004D400
public override DayOfWeek GetDayOfWeek(DateTime time)
{
this.M_CheckDateTime(time);
int num = CCFixed.FromDateTime(time);
return CCFixed.day_of_week(num);
}
/// <summary>Returns the day of the year in the specified <see cref="T:System.DateTime" /> object.</summary>
/// <returns>An integer from 1 through 366 that represents the day of the year in the specified <see cref="T:System.DateTime" /> object.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="time" /> parameter represents a date less than <see cref="P:System.Globalization.PersianCalendar.MinSupportedDateTime" /> or greater than <see cref="P:System.Globalization.PersianCalendar.MaxSupportedDateTime" />.</exception>
// Token: 0x06001477 RID: 5239 RVA: 0x0004F224 File Offset: 0x0004D424
public override int GetDayOfYear(DateTime time)
{
this.M_CheckDateTime(time);
int num = CCFixed.FromDateTime(time);
int num2 = this.year_from_fixed(num);
int num3 = this.fixed_from_dmy(1, 1, num2);
return num - num3 + 1;
}
/// <summary>Returns the number of days in the specified month of the specified year and era.</summary>
/// <returns>The number of days in the specified month of the specified year and era.</returns>
/// <param name="year">An integer from 1 through 9378 that represents the year. </param>
/// <param name="month">An integer that represents the month, and ranges from 1 through 12 if <paramref name="year" /> is not 9378, or 1 through 10 if <paramref name="year" /> is 9378.</param>
/// <param name="era">An integer from 0 through 1 that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" />, <paramref name="month" />, or <paramref name="era" /> is outside the range supported by this calendar. </exception>
// Token: 0x06001478 RID: 5240 RVA: 0x0004F258 File Offset: 0x0004D458
public override int GetDaysInMonth(int year, int month, int era)
{
this.M_CheckYME(year, month, ref era);
if (month <= 6)
{
return 31;
}
if (month == 12 && !this.is_leap_year(year))
{
return 29;
}
return 30;
}
/// <summary>Returns the number of days in the specified year of the specified era.</summary>
/// <returns>The number of days in the specified year and era. The number of days is 365 in a common year or 366 in a leap year.</returns>
/// <param name="year">An integer from 1 through 9378 that represents the year. </param>
/// <param name="era">An integer from 0 through 1 that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> or <paramref name="era" /> is outside the range supported by this calendar. </exception>
// Token: 0x06001479 RID: 5241 RVA: 0x0004F288 File Offset: 0x0004D488
public override int GetDaysInYear(int year, int era)
{
this.M_CheckYE(year, ref era);
return (!this.is_leap_year(year)) ? 365 : 366;
}
/// <summary>Returns the era in the specified <see cref="T:System.DateTime" /> object.</summary>
/// <returns>Always returns <see cref="F:System.Globalization.PersianCalendar.PersianEra" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="time" /> parameter represents a date less than <see cref="P:System.Globalization.PersianCalendar.MinSupportedDateTime" /> or greater than <see cref="P:System.Globalization.PersianCalendar.MaxSupportedDateTime" />.</exception>
// Token: 0x0600147A RID: 5242 RVA: 0x0004F2BC File Offset: 0x0004D4BC
public override int GetEra(DateTime time)
{
this.M_CheckDateTime(time);
return PersianCalendar.PersianEra;
}
/// <summary>Returns the leap month for a specified year and era.</summary>
/// <returns>The return value is always 0.</returns>
/// <param name="year">An integer from 1 through 9378 that represents the year to convert. </param>
/// <param name="era">An integer from 0 through 1 that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> or <paramref name="era" /> is outside the range supported by this calendar. </exception>
// Token: 0x0600147B RID: 5243 RVA: 0x0004F2CC File Offset: 0x0004D4CC
public override int GetLeapMonth(int year, int era)
{
return 0;
}
/// <summary>Returns the month in the specified <see cref="T:System.DateTime" /> object.</summary>
/// <returns>An integer from 1 through 12 that represents the month in the specified <see cref="T:System.DateTime" /> object.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="time" /> parameter represents a date less than <see cref="P:System.Globalization.PersianCalendar.MinSupportedDateTime" /> or greater than <see cref="P:System.Globalization.PersianCalendar.MaxSupportedDateTime" />.</exception>
// Token: 0x0600147C RID: 5244 RVA: 0x0004F2D0 File Offset: 0x0004D4D0
public override int GetMonth(DateTime time)
{
this.M_CheckDateTime(time);
int num = CCFixed.FromDateTime(time);
int num2;
int num3;
this.my_from_fixed(out num2, out num3, num);
return num2;
}
/// <summary>Returns the number of months in the specified year of the specified era.</summary>
/// <returns>Returns 10 if the <paramref name="year" /> parameter is 9378; otherwise, always returns 12.</returns>
/// <param name="year">An integer from 1 through 9378 that represents the year. </param>
/// <param name="era">An integer from 0 through 1 that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> or <paramref name="era" /> is outside the range supported by this calendar. </exception>
// Token: 0x0600147D RID: 5245 RVA: 0x0004F2F8 File Offset: 0x0004D4F8
public override int GetMonthsInYear(int year, int era)
{
this.M_CheckYE(year, ref era);
return 12;
}
/// <summary>Returns the year in the specified <see cref="T:System.DateTime" /> object.</summary>
/// <returns>An integer from 1 through 9378 that represents the year in the specified <see cref="T:System.DateTime" />. </returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="time" /> parameter represents a date less than <see cref="P:System.Globalization.PersianCalendar.MinSupportedDateTime" /> or greater than <see cref="P:System.Globalization.PersianCalendar.MaxSupportedDateTime" />.</exception>
// Token: 0x0600147E RID: 5246 RVA: 0x0004F308 File Offset: 0x0004D508
public override int GetYear(DateTime time)
{
this.M_CheckDateTime(time);
int num = CCFixed.FromDateTime(time);
return this.year_from_fixed(num);
}
/// <summary>Determines whether the specified date is a leap day.</summary>
/// <returns>true if the specified day is a leap day; otherwise, false.</returns>
/// <param name="year">An integer from 1 through 9378 that represents the year. </param>
/// <param name="month">An integer that represents the month and ranges from 1 through 12 if <paramref name="year" /> is not 9378, or 1 through 10 if <paramref name="year" /> is 9378.</param>
/// <param name="day">An integer from 1 through 31 that represents the day. </param>
/// <param name="era">An integer from 0 through 1 that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" />, <paramref name="month" />, <paramref name="day" />, or <paramref name="era" /> is outside the range supported by this calendar. </exception>
// Token: 0x0600147F RID: 5247 RVA: 0x0004F32C File Offset: 0x0004D52C
public override bool IsLeapDay(int year, int month, int day, int era)
{
this.M_CheckYMDE(year, month, day, ref era);
return this.is_leap_year(year) && month == 12 && day == 30;
}
/// <summary>Determines whether the specified month in the specified year and era is a leap month.</summary>
/// <returns>Always returns false because the <see cref="T:System.Globalization.PersianCalendar" /> class does not support the notion of a leap month.</returns>
/// <param name="year">An integer from 1 through 9378 that represents the year. </param>
/// <param name="month">An integer that represents the month and ranges from 1 through 12 if <paramref name="year" /> is not 9378, or 1 through 10 if <paramref name="year" /> is 9378.</param>
/// <param name="era">An integer from 0 through 1 that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" />, <paramref name="month" />, or <paramref name="era" /> is outside the range supported by this calendar. </exception>
// Token: 0x06001480 RID: 5248 RVA: 0x0004F358 File Offset: 0x0004D558
public override bool IsLeapMonth(int year, int month, int era)
{
this.M_CheckYME(year, month, ref era);
return false;
}
/// <summary>Determines whether the specified year in the specified era is a leap year.</summary>
/// <returns>true if the specified year is a leap year; otherwise, false.</returns>
/// <param name="year">An integer from 1 through 9378 that represents the year. </param>
/// <param name="era">An integer from 0 through 1 that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> or <paramref name="era" /> is outside the range supported by this calendar. </exception>
// Token: 0x06001481 RID: 5249 RVA: 0x0004F368 File Offset: 0x0004D568
public override bool IsLeapYear(int year, int era)
{
this.M_CheckYE(year, ref era);
return this.is_leap_year(year);
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is set to the specified date, time, and era.</summary>
/// <returns>A <see cref="T:System.DateTime" /> that is set to the specified date and time in the current era.</returns>
/// <param name="year">An integer from 1 through 9378 that represents the year. </param>
/// <param name="month">An integer from 1 through 12 that represents the month. </param>
/// <param name="day">An integer from 1 through 31 that represents the day. </param>
/// <param name="hour">An integer from 0 through 23 that represents the hour. </param>
/// <param name="minute">An integer from 0 through 59 that represents the minute. </param>
/// <param name="second">An integer from 0 through 59 that represents the second. </param>
/// <param name="millisecond">An integer from 0 through 999 that represents the millisecond. </param>
/// <param name="era">An integer from 0 through 1 that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" />, <paramref name="month" />, <paramref name="day" />, <paramref name="hour" />, <paramref name="minute" />, <paramref name="second" />, <paramref name="millisecond" />, or <paramref name="era" /> is outside the range supported by this calendar.</exception>
// Token: 0x06001482 RID: 5250 RVA: 0x0004F37C File Offset: 0x0004D57C
public override DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era)
{
this.M_CheckYMDE(year, month, day, ref era);
base.M_CheckHMSM(hour, minute, second, millisecond);
int num = this.fixed_from_dmy(day, month, year);
return CCFixed.ToDateTime(num, hour, minute, second, (double)millisecond);
}
/// <summary>Converts the specified year to a four-digit year representation.</summary>
/// <returns>An integer that contains the four-digit representation of <paramref name="year" />.</returns>
/// <param name="year">An integer from 1 through 9378 that represents the year to convert. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is less than 0 or greater than 9378. </exception>
// Token: 0x06001483 RID: 5251 RVA: 0x0004F3BC File Offset: 0x0004D5BC
public override int ToFourDigitYear(int year)
{
base.M_ArgumentInRange("year", year, 0, 99);
int num = this.twoDigitYearMax % 100;
int num2 = this.twoDigitYearMax - num;
if (year <= num)
{
return num2 + year;
}
return num2 + year - 100;
}
/// <summary>Gets a value indicating whether the current calendar is solar-based, lunar-based, or lunisolar-based.</summary>
/// <returns>Always returns <see cref="F:System.Globalization.CalendarAlgorithmType.SolarCalendar" />.</returns>
// Token: 0x17000395 RID: 917
// (get) Token: 0x06001484 RID: 5252 RVA: 0x0004F3FC File Offset: 0x0004D5FC
public override CalendarAlgorithmType AlgorithmType
{
get
{
return CalendarAlgorithmType.SolarCalendar;
}
}
/// <summary>Gets the earliest date and time supported by the <see cref="T:System.Globalization.PersianCalendar" /> class.</summary>
/// <returns>The earliest date and time supported by the <see cref="T:System.Globalization.PersianCalendar" /> class, which is equivalent to the first moment of March 21, 622 C.E. in the Gregorian calendar.</returns>
// Token: 0x17000396 RID: 918
// (get) Token: 0x06001485 RID: 5253 RVA: 0x0004F400 File Offset: 0x0004D600
public override DateTime MinSupportedDateTime
{
get
{
return PersianCalendar.PersianMin;
}
}
/// <summary>Gets the latest date and time supported by the <see cref="T:System.Globalization.PersianCalendar" /> class.</summary>
/// <returns>The latest date and time supported by the <see cref="T:System.Globalization.PersianCalendar" /> class, which is equivalent to the last moment of December 31, 9999 C.E. in the Gregorian calendar.</returns>
// Token: 0x17000397 RID: 919
// (get) Token: 0x06001486 RID: 5254 RVA: 0x0004F408 File Offset: 0x0004D608
public override DateTime MaxSupportedDateTime
{
get
{
return PersianCalendar.PersianMax;
}
}
// Token: 0x040005C7 RID: 1479
internal const long M_MinTicks = 196036416000000000L;
// Token: 0x040005C8 RID: 1480
internal const int M_MinYear = 1;
// Token: 0x040005C9 RID: 1481
internal const int epoch = 226895;
/// <summary>Represents the current era. This field is constant.</summary>
// Token: 0x040005CA RID: 1482
public static readonly int PersianEra = 1;
// Token: 0x040005CB RID: 1483
private static DateTime PersianMin = new DateTime(622, 3, 21, 0, 0, 0);
// Token: 0x040005CC RID: 1484
private static DateTime PersianMax = new DateTime(9999, 12, 31, 11, 59, 59);
}
}
+14
View File
@@ -0,0 +1,14 @@
using System;
namespace System.Globalization
{
// Token: 0x0200018C RID: 396
internal class Punycode : Bootstring
{
// Token: 0x060013B8 RID: 5048 RVA: 0x0004CDA0 File Offset: 0x0004AFA0
public Punycode()
: base('-', 36, 1, 26, 38, 700, 72, 128)
{
}
}
}
+329
View File
@@ -0,0 +1,329 @@
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Contains information about the country/region.</summary>
// Token: 0x02000195 RID: 405
[ComVisible(true)]
[Serializable]
public class RegionInfo
{
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.RegionInfo" /> class based on the country/region associated with the specified culture identifier.</summary>
/// <param name="culture">A culture identifier. </param>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="culture" /> specifies either an invariant, custom, or neutral culture.</exception>
// Token: 0x06001487 RID: 5255 RVA: 0x0004F410 File Offset: 0x0004D610
public RegionInfo(int culture)
{
if (!this.GetByTerritory(CultureInfo.GetCultureInfo(culture)))
{
throw new ArgumentException(string.Format("Region ID {0} (0x{0:X4}) is not a supported region.", culture), "culture");
}
}
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.RegionInfo" /> class based on the country/region or specific culture, specified by name.</summary>
/// <param name="name">A string containing one of the two-letter codes defined in ISO 3166 for country/region.-or-Beginning in .NET Framework version 2.0, a string containing the culture name for a specific culture, custom culture, or Windows-only culture. If the culture name is not in RFC 4646 format, your application should specify the entire culture name, not just the country/region. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="name" /> is not a valid country/region name or specific culture name.</exception>
// Token: 0x06001488 RID: 5256 RVA: 0x0004F450 File Offset: 0x0004D650
public RegionInfo(string name)
{
if (name == null)
{
throw new ArgumentNullException();
}
if (this.construct_internal_region_from_name(name.ToUpperInvariant()))
{
this.lcid = name.GetHashCode();
return;
}
if (!this.GetByTerritory(CultureInfo.GetCultureInfo(name)))
{
throw new ArgumentException(string.Format("Region name {0} is not supported.", name), "name");
}
}
/// <summary>Gets the <see cref="T:System.Globalization.RegionInfo" /> that represents the country/region used by the current thread.</summary>
/// <returns>The <see cref="T:System.Globalization.RegionInfo" /> that represents the country/region used by the current thread.</returns>
// Token: 0x17000398 RID: 920
// (get) Token: 0x06001489 RID: 5257 RVA: 0x0004F4B4 File Offset: 0x0004D6B4
public static RegionInfo CurrentRegion
{
get
{
if (RegionInfo.currentRegion == null)
{
CultureInfo currentCulture = CultureInfo.CurrentCulture;
if (currentCulture == null || CultureInfo.BootstrapCultureID == 127)
{
return null;
}
RegionInfo.currentRegion = new RegionInfo(CultureInfo.BootstrapCultureID);
}
return RegionInfo.currentRegion;
}
}
// Token: 0x0600148A RID: 5258 RVA: 0x0004F4FC File Offset: 0x0004D6FC
private bool GetByTerritory(CultureInfo ci)
{
if (ci == null)
{
throw new Exception("INTERNAL ERROR: should not happen.");
}
if (ci.IsNeutralCulture || ci.Territory == null)
{
return false;
}
this.lcid = ci.LCID;
return this.construct_internal_region_from_name(ci.Territory.ToUpperInvariant());
}
// Token: 0x0600148B RID: 5259
[MethodImpl(MethodImplOptions.InternalCall)]
private extern bool construct_internal_region_from_name(string name);
/// <summary>Gets the name, in English, of the currency used in the country/region.</summary>
/// <returns>The name, in English, of the currency used in the country/region.</returns>
// Token: 0x17000399 RID: 921
// (get) Token: 0x0600148C RID: 5260 RVA: 0x0004F550 File Offset: 0x0004D750
[ComVisible(false)]
public virtual string CurrencyEnglishName
{
get
{
return this.currencyEnglishName;
}
}
/// <summary>Gets the currency symbol associated with the country/region.</summary>
/// <returns>The currency symbol associated with the country/region.</returns>
// Token: 0x1700039A RID: 922
// (get) Token: 0x0600148D RID: 5261 RVA: 0x0004F558 File Offset: 0x0004D758
public virtual string CurrencySymbol
{
get
{
return this.currencySymbol;
}
}
/// <summary>Gets the full name of the country/region in the language of the localized version of .NET Framework.</summary>
/// <returns>The full name of the country/region in the language of the localized version of .NET Framework.</returns>
// Token: 0x1700039B RID: 923
// (get) Token: 0x0600148E RID: 5262 RVA: 0x0004F560 File Offset: 0x0004D760
[MonoTODO("DisplayName currently only returns the EnglishName")]
public virtual string DisplayName
{
get
{
return this.englishName;
}
}
/// <summary>Gets the full name of the country/region in English.</summary>
/// <returns>The full name of the country/region in English.</returns>
// Token: 0x1700039C RID: 924
// (get) Token: 0x0600148F RID: 5263 RVA: 0x0004F568 File Offset: 0x0004D768
public virtual string EnglishName
{
get
{
return this.englishName;
}
}
/// <summary>Gets a unique identification number for a geographical region, country, city, or location.</summary>
/// <returns>A 32-bit signed number that uniquely identifies a geographical location.</returns>
// Token: 0x1700039D RID: 925
// (get) Token: 0x06001490 RID: 5264 RVA: 0x0004F570 File Offset: 0x0004D770
[ComVisible(false)]
public virtual int GeoId
{
get
{
return this.regionId;
}
}
/// <summary>Gets a value indicating whether the country/region uses the metric system for measurements.</summary>
/// <returns>true if the country/region uses the metric system for measurements; otherwise, false.</returns>
// Token: 0x1700039E RID: 926
// (get) Token: 0x06001491 RID: 5265 RVA: 0x0004F578 File Offset: 0x0004D778
public virtual bool IsMetric
{
get
{
string text = this.iso2Name;
if (text != null)
{
if (RegionInfo.<>f__switch$map1B == null)
{
RegionInfo.<>f__switch$map1B = new Dictionary<string, int>(2)
{
{ "US", 0 },
{ "UK", 0 }
};
}
int num;
if (RegionInfo.<>f__switch$map1B.TryGetValue(text, out num))
{
if (num == 0)
{
return false;
}
}
}
return true;
}
}
/// <summary>Gets the three-character ISO 4217 currency symbol associated with the country/region.</summary>
/// <returns>The three-character ISO 4217 currency symbol associated with the country/region.</returns>
// Token: 0x1700039F RID: 927
// (get) Token: 0x06001492 RID: 5266 RVA: 0x0004F5E4 File Offset: 0x0004D7E4
public virtual string ISOCurrencySymbol
{
get
{
return this.isoCurrencySymbol;
}
}
/// <summary>Gets the name of a country/region formatted in the native language of the country/region.</summary>
/// <returns>The native name of the country/region formatted in the language associated with the ISO 3166 country/region code. </returns>
// Token: 0x170003A0 RID: 928
// (get) Token: 0x06001493 RID: 5267 RVA: 0x0004F5EC File Offset: 0x0004D7EC
[ComVisible(false)]
public virtual string NativeName
{
get
{
return this.DisplayName;
}
}
/// <summary>Gets the name of the currency used in the country/region, formatted in the native language of the country/region. </summary>
/// <returns>The native name of the currency used in the country/region, formatted in the language associated with the ISO 3166 country/region code. </returns>
// Token: 0x170003A1 RID: 929
// (get) Token: 0x06001494 RID: 5268 RVA: 0x0004F5F4 File Offset: 0x0004D7F4
[ComVisible(false)]
[MonoTODO("Not implemented")]
public virtual string CurrencyNativeName
{
get
{
throw new NotImplementedException();
}
}
/// <summary>Gets the name or ISO 3166 two-letter country/region code for the current <see cref="T:System.Globalization.RegionInfo" /> object.</summary>
/// <returns>The value specified by the <paramref name="name" /> parameter of the <see cref="M:System.Globalization.RegionInfo.#ctor(System.String)" /> constructor. The return value is in uppercase.-or-The two-letter code defined in ISO 3166 for the country/region specified by the <paramref name="culture" /> parameter of the <see cref="M:System.Globalization.RegionInfo.#ctor(System.Int32)" /> constructor. The return value is in uppercase.</returns>
// Token: 0x170003A2 RID: 930
// (get) Token: 0x06001495 RID: 5269 RVA: 0x0004F5FC File Offset: 0x0004D7FC
public virtual string Name
{
get
{
return this.iso2Name;
}
}
/// <summary>Gets the three-letter code defined in ISO 3166 for the country/region.</summary>
/// <returns>The three-letter code defined in ISO 3166 for the country/region.</returns>
// Token: 0x170003A3 RID: 931
// (get) Token: 0x06001496 RID: 5270 RVA: 0x0004F604 File Offset: 0x0004D804
public virtual string ThreeLetterISORegionName
{
get
{
return this.iso3Name;
}
}
/// <summary>Gets the three-letter code assigned by Windows to the country/region represented by this <see cref="T:System.Globalization.RegionInfo" />.</summary>
/// <returns>The three-letter code assigned by Windows to the country/region represented by this <see cref="T:System.Globalization.RegionInfo" />.</returns>
// Token: 0x170003A4 RID: 932
// (get) Token: 0x06001497 RID: 5271 RVA: 0x0004F60C File Offset: 0x0004D80C
public virtual string ThreeLetterWindowsRegionName
{
get
{
return this.win3Name;
}
}
/// <summary>Gets the two-letter code defined in ISO 3166 for the country/region.</summary>
/// <returns>The two-letter code defined in ISO 3166 for the country/region.</returns>
// Token: 0x170003A5 RID: 933
// (get) Token: 0x06001498 RID: 5272 RVA: 0x0004F614 File Offset: 0x0004D814
public virtual string TwoLetterISORegionName
{
get
{
return this.iso2Name;
}
}
/// <summary>Determines whether the specified object is the same instance as the current <see cref="T:System.Globalization.RegionInfo" />.</summary>
/// <returns>true if the <paramref name="value" /> parameter is a <see cref="T:System.Globalization.RegionInfo" /> object and its <see cref="P:System.Globalization.RegionInfo.Name" /> property is the same as the <see cref="P:System.Globalization.RegionInfo.Name" /> property of the current <see cref="T:System.Globalization.RegionInfo" /> object; otherwise, false.</returns>
/// <param name="value">The object to compare with the current <see cref="T:System.Globalization.RegionInfo" />. </param>
// Token: 0x06001499 RID: 5273 RVA: 0x0004F61C File Offset: 0x0004D81C
public override bool Equals(object value)
{
RegionInfo regionInfo = value as RegionInfo;
return regionInfo != null && this.lcid == regionInfo.lcid;
}
/// <summary>Serves as a hash function for the current <see cref="T:System.Globalization.RegionInfo" />, suitable for hashing algorithms and data structures, such as a hash table.</summary>
/// <returns>A hash code for the current <see cref="T:System.Globalization.RegionInfo" />.</returns>
// Token: 0x0600149A RID: 5274 RVA: 0x0004F648 File Offset: 0x0004D848
public override int GetHashCode()
{
return (int)((ulong)int.MinValue + (ulong)((long)((long)this.regionId << 3)) + (ulong)((long)this.regionId));
}
/// <summary>Returns a string containing the culture name or ISO 3166 two-letter country/region codes specified for the current <see cref="T:System.Globalization.RegionInfo" />.</summary>
/// <returns>A string containing the culture name or ISO 3166 two-letter country/region codes defined for the current <see cref="T:System.Globalization.RegionInfo" />.</returns>
// Token: 0x0600149B RID: 5275 RVA: 0x0004F664 File Offset: 0x0004D864
public override string ToString()
{
return this.Name;
}
// Token: 0x040005CD RID: 1485
private static RegionInfo currentRegion;
// Token: 0x040005CE RID: 1486
private int lcid;
// Token: 0x040005CF RID: 1487
private int regionId;
// Token: 0x040005D0 RID: 1488
private string iso2Name;
// Token: 0x040005D1 RID: 1489
private string iso3Name;
// Token: 0x040005D2 RID: 1490
private string win3Name;
// Token: 0x040005D3 RID: 1491
private string englishName;
// Token: 0x040005D4 RID: 1492
private string currencySymbol;
// Token: 0x040005D5 RID: 1493
private string isoCurrencySymbol;
// Token: 0x040005D6 RID: 1494
private string currencyEnglishName;
}
}
+136
View File
@@ -0,0 +1,136 @@
using System;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Represents the result of mapping a string to its sort key.</summary>
// Token: 0x0200008F RID: 143
[ComVisible(true)]
[Serializable]
public class SortKey
{
// Token: 0x0600081D RID: 2077 RVA: 0x0001D674 File Offset: 0x0001B874
internal SortKey(int lcid, string source, CompareOptions opt)
{
this.lcid = lcid;
this.source = source;
this.options = opt;
}
// Token: 0x0600081E RID: 2078 RVA: 0x0001D694 File Offset: 0x0001B894
internal SortKey(int lcid, string source, byte[] buffer, CompareOptions opt, int lv1Length, int lv2Length, int lv3Length, int kanaSmallLength, int markTypeLength, int katakanaLength, int kanaWidthLength, int identLength)
{
this.lcid = lcid;
this.source = source;
this.key = buffer;
this.options = opt;
}
/// <summary>Compares two sort keys.</summary>
/// <returns>Value Condition Less than zero <paramref name="sortkey1" /> is less than <paramref name="sortkey2" />. Zero <paramref name="sortkey1" /> is equal to <paramref name="sortkey2" />. Greater than zero <paramref name="sortkey1" /> is greater than <paramref name="sortkey2" />. </returns>
/// <param name="sortkey1">The first sort key to compare. </param>
/// <param name="sortkey2">The second sort key to compare. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="sortkey1" /> or <paramref name="sortkey2" /> is null.</exception>
// Token: 0x0600081F RID: 2079 RVA: 0x0001D6BC File Offset: 0x0001B8BC
public static int Compare(SortKey sortkey1, SortKey sortkey2)
{
if (sortkey1 == null)
{
throw new ArgumentNullException("sortkey1");
}
if (sortkey2 == null)
{
throw new ArgumentNullException("sortkey2");
}
if (object.ReferenceEquals(sortkey1, sortkey2) || object.ReferenceEquals(sortkey1.OriginalString, sortkey2.OriginalString))
{
return 0;
}
byte[] keyData = sortkey1.KeyData;
byte[] keyData2 = sortkey2.KeyData;
int num = ((keyData.Length <= keyData2.Length) ? keyData.Length : keyData2.Length);
for (int i = 0; i < num; i++)
{
if (keyData[i] != keyData2[i])
{
return (keyData[i] >= keyData2[i]) ? 1 : (-1);
}
}
return (keyData.Length != keyData2.Length) ? ((keyData.Length >= keyData2.Length) ? 1 : (-1)) : 0;
}
/// <summary>Gets the original string used to create the current <see cref="T:System.Globalization.SortKey" /> object.</summary>
/// <returns>The original string used to create the current <see cref="T:System.Globalization.SortKey" /> object.</returns>
// Token: 0x170000E0 RID: 224
// (get) Token: 0x06000820 RID: 2080 RVA: 0x0001D788 File Offset: 0x0001B988
public virtual string OriginalString
{
get
{
return this.source;
}
}
/// <summary>Gets the byte array representing the current <see cref="T:System.Globalization.SortKey" /> object.</summary>
/// <returns>A byte array representing the current <see cref="T:System.Globalization.SortKey" /> object.</returns>
// Token: 0x170000E1 RID: 225
// (get) Token: 0x06000821 RID: 2081 RVA: 0x0001D790 File Offset: 0x0001B990
public virtual byte[] KeyData
{
get
{
return this.key;
}
}
/// <summary>Determines whether the specified object is equal to the current <see cref="T:System.Globalization.SortKey" /> object.</summary>
/// <returns>true if the <paramref name="value" /> parameter is equal to the current <see cref="T:System.Globalization.SortKey" /> object; otherwise, false. </returns>
/// <param name="value">The object to compare with the current <see cref="T:System.Globalization.SortKey" /> object. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="value" /> is null.</exception>
// Token: 0x06000822 RID: 2082 RVA: 0x0001D798 File Offset: 0x0001B998
public override bool Equals(object value)
{
SortKey sortKey = value as SortKey;
return sortKey != null && this.lcid == sortKey.lcid && this.options == sortKey.options && SortKey.Compare(this, sortKey) == 0;
}
/// <summary>Serves as a hash function for the current <see cref="T:System.Globalization.SortKey" /> object that is suitable for hashing algorithms and data structures such as a hash table.</summary>
/// <returns>A hash code for the current <see cref="T:System.Globalization.SortKey" /> object.</returns>
// Token: 0x06000823 RID: 2083 RVA: 0x0001D7E4 File Offset: 0x0001B9E4
public override int GetHashCode()
{
if (this.key.Length == 0)
{
return 0;
}
int num = (int)this.key[0];
for (int i = 1; i < this.key.Length; i++)
{
num ^= (int)this.key[i] << (i & 3);
}
return num;
}
/// <summary>Returns a string that represents the current <see cref="T:System.Globalization.SortKey" /> object.</summary>
/// <returns>A string that represents the current <see cref="T:System.Globalization.SortKey" /> object.</returns>
// Token: 0x06000824 RID: 2084 RVA: 0x0001D838 File Offset: 0x0001BA38
public override string ToString()
{
return string.Concat(new object[] { "SortKey - ", this.lcid, ", ", this.options, ", ", this.source });
}
// Token: 0x0400018E RID: 398
private readonly string source;
// Token: 0x0400018F RID: 399
private readonly CompareOptions options;
// Token: 0x04000190 RID: 400
private readonly byte[] key;
// Token: 0x04000191 RID: 401
private readonly int lcid;
}
}
+300
View File
@@ -0,0 +1,300 @@
using System;
using System.Collections;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Provides functionality to split a string into text elements and to iterate through those text elements.</summary>
// Token: 0x02000196 RID: 406
[ComVisible(true)]
[Serializable]
public class StringInfo
{
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.StringInfo" /> class. </summary>
// Token: 0x0600149C RID: 5276 RVA: 0x0004F66C File Offset: 0x0004D86C
public StringInfo()
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.StringInfo" /> class to a specified string.</summary>
/// <param name="value">A string to initialize this <see cref="T:System.Globalization.StringInfo" /> object.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="value" /> is null.</exception>
// Token: 0x0600149D RID: 5277 RVA: 0x0004F674 File Offset: 0x0004D874
public StringInfo(string value)
{
this.String = value;
}
/// <summary>Indicates whether the current <see cref="T:System.Globalization.StringInfo" /> object is equal to a specified object.</summary>
/// <returns>true if the <paramref name="value" /> parameter is a <see cref="T:System.Globalization.StringInfo" /> object and its <see cref="P:System.Globalization.StringInfo.String" /> property equals the <see cref="P:System.Globalization.StringInfo.String" /> property of this <see cref="T:System.Globalization.StringInfo" /> object; otherwise, false.</returns>
/// <param name="value">An object.</param>
// Token: 0x0600149E RID: 5278 RVA: 0x0004F684 File Offset: 0x0004D884
[ComVisible(false)]
public override bool Equals(object value)
{
StringInfo stringInfo = value as StringInfo;
return stringInfo != null && this.s == stringInfo.s;
}
/// <summary>Calculates a hash code for the value of the current <see cref="T:System.Globalization.StringInfo" /> object.</summary>
/// <returns>A 32-bit signed integer hash code based on the string value of this <see cref="T:System.Globalization.StringInfo" /> object.</returns>
// Token: 0x0600149F RID: 5279 RVA: 0x0004F6B4 File Offset: 0x0004D8B4
[ComVisible(false)]
public override int GetHashCode()
{
return this.s.GetHashCode();
}
/// <summary>Gets the number of text elements in the current <see cref="T:System.Globalization.StringInfo" /> object.</summary>
/// <returns>The number of base characters, surrogate pairs, and combining character sequences in this <see cref="T:System.Globalization.StringInfo" /> object.</returns>
// Token: 0x170003A6 RID: 934
// (get) Token: 0x060014A0 RID: 5280 RVA: 0x0004F6C4 File Offset: 0x0004D8C4
public int LengthInTextElements
{
get
{
if (this.length < 0)
{
this.length = 0;
int i = 0;
while (i < this.s.Length)
{
i += StringInfo.GetNextTextElementLength(this.s, i);
this.length++;
}
}
return this.length;
}
}
/// <summary>Gets or sets the value of the current <see cref="T:System.Globalization.StringInfo" /> object.</summary>
/// <returns>The string that is the value of the current <see cref="T:System.Globalization.StringInfo" /> object.</returns>
/// <exception cref="T:System.ArgumentNullException">The value in a set operation is null.</exception>
// Token: 0x170003A7 RID: 935
// (get) Token: 0x060014A1 RID: 5281 RVA: 0x0004F720 File Offset: 0x0004D920
// (set) Token: 0x060014A2 RID: 5282 RVA: 0x0004F728 File Offset: 0x0004D928
public string String
{
get
{
return this.s;
}
set
{
if (value == null)
{
throw new ArgumentNullException("value");
}
this.length = -1;
this.s = value;
}
}
/// <summary>Retrieves a substring of text elements from the current <see cref="T:System.Globalization.StringInfo" /> object starting from a specified text element and continuing through the last text element.</summary>
/// <returns>A substring of text elements in this <see cref="T:System.Globalization.StringInfo" /> object, starting from the text element index specified by the <paramref name="startingTextElement" /> parameter and continuing through the last text element in this object.</returns>
/// <param name="startingTextElement">The zero-based index of a text element in this <see cref="T:System.Globalization.StringInfo" /> object.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="startingTextElement" /> is less than zero.-or-The string that is the value of the current <see cref="T:System.Globalization.StringInfo" /> object is the empty string ("").</exception>
// Token: 0x060014A3 RID: 5283 RVA: 0x0004F74C File Offset: 0x0004D94C
public string SubstringByTextElements(int startingTextElement)
{
if (startingTextElement < 0 || this.s.Length == 0)
{
throw new ArgumentOutOfRangeException("startingTextElement");
}
int num = 0;
for (int i = 0; i < startingTextElement; i++)
{
if (num >= this.s.Length)
{
throw new ArgumentOutOfRangeException("startingTextElement");
}
num += StringInfo.GetNextTextElementLength(this.s, num);
}
return this.s.Substring(num);
}
/// <summary>Retrieves a substring of text elements from the current <see cref="T:System.Globalization.StringInfo" /> object starting from a specified text element and continuing through the specified number of text elements.</summary>
/// <returns>A substring of text elements in this <see cref="T:System.Globalization.StringInfo" /> object. The substring consists of the number of text elements specified by the <paramref name="lengthInTextElements" /> parameter and starts from the text element index specified by the <paramref name="startingTextElement" /> parameter.</returns>
/// <param name="startingTextElement">The zero-based index of a text element in this <see cref="T:System.Globalization.StringInfo" /> object.</param>
/// <param name="lengthInTextElements">The number of text elements to retrieve.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="startingTextElement" /> is less than zero.-or-<paramref name="startingTextElement" /> is greater than or equal to the length of the string that is the value of the current <see cref="T:System.Globalization.StringInfo" /> object.-or-<paramref name="lengthInTextElements" /> is less than zero.-or-The string that is the value of the current <see cref="T:System.Globalization.StringInfo" /> object is the empty string ("").-or-<paramref name="startingTextElement" /> + <paramref name="lengthInTextElements" /> specify an index that is greater than the number of text elements in this <see cref="T:System.Globalization.StringInfo" /> object.</exception>
// Token: 0x060014A4 RID: 5284 RVA: 0x0004F7C8 File Offset: 0x0004D9C8
public string SubstringByTextElements(int startingTextElement, int lengthInTextElements)
{
if (startingTextElement < 0 || this.s.Length == 0)
{
throw new ArgumentOutOfRangeException("startingTextElement");
}
if (lengthInTextElements < 0)
{
throw new ArgumentOutOfRangeException("lengthInTextElements");
}
int num = 0;
for (int i = 0; i < startingTextElement; i++)
{
if (num >= this.s.Length)
{
throw new ArgumentOutOfRangeException("startingTextElement");
}
num += StringInfo.GetNextTextElementLength(this.s, num);
}
int num2 = num;
for (int j = 0; j < lengthInTextElements; j++)
{
if (num >= this.s.Length)
{
throw new ArgumentOutOfRangeException("lengthInTextElements");
}
num += StringInfo.GetNextTextElementLength(this.s, num);
}
return this.s.Substring(num2, num - num2);
}
/// <summary>Gets the first text element in a specified string.</summary>
/// <returns>A string containing the first text element in the specified string.</returns>
/// <param name="str">The string from which to get the text element. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="str" /> is null. </exception>
// Token: 0x060014A5 RID: 5285 RVA: 0x0004F898 File Offset: 0x0004DA98
public static string GetNextTextElement(string str)
{
if (str == null || str.Length == 0)
{
throw new ArgumentNullException("string is null");
}
return StringInfo.GetNextTextElement(str, 0);
}
/// <summary>Gets the text element at the specified index of the specified string.</summary>
/// <returns>A string containing the text element at the specified index of the specified string.</returns>
/// <param name="str">The string from which to get the text element. </param>
/// <param name="index">The zero-based index at which the text element starts. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="str" /> is null. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="index" /> is outside the range of valid indexes for <paramref name="str" />. </exception>
// Token: 0x060014A6 RID: 5286 RVA: 0x0004F8C0 File Offset: 0x0004DAC0
public static string GetNextTextElement(string str, int index)
{
int nextTextElementLength = StringInfo.GetNextTextElementLength(str, index);
return (nextTextElementLength == 1) ? new string(str[index], 1) : str.Substring(index, nextTextElementLength);
}
// Token: 0x060014A7 RID: 5287 RVA: 0x0004F8F8 File Offset: 0x0004DAF8
private static int GetNextTextElementLength(string str, int index)
{
if (str == null)
{
throw new ArgumentNullException("string is null");
}
if (index >= str.Length)
{
return 0;
}
if (index < 0)
{
throw new ArgumentOutOfRangeException("Index is not valid");
}
char c = str[index];
UnicodeCategory unicodeCategory = char.GetUnicodeCategory(c);
if (unicodeCategory == UnicodeCategory.Surrogate)
{
if (c < '\ud800' || c > '\udbff')
{
return 1;
}
if (index + 1 < str.Length && str[index + 1] >= '\udc00' && str[index + 1] <= '\udfff')
{
return 2;
}
return 1;
}
else
{
if (unicodeCategory == UnicodeCategory.NonSpacingMark || unicodeCategory == UnicodeCategory.SpacingCombiningMark || unicodeCategory == UnicodeCategory.EnclosingMark)
{
return 1;
}
int num = 1;
while (index + num < str.Length)
{
unicodeCategory = char.GetUnicodeCategory(str[index + num]);
if (unicodeCategory != UnicodeCategory.NonSpacingMark && unicodeCategory != UnicodeCategory.SpacingCombiningMark && unicodeCategory != UnicodeCategory.EnclosingMark)
{
break;
}
num++;
}
return num;
}
}
/// <summary>Returns an enumerator that iterates through the text elements of the entire string.</summary>
/// <returns>A <see cref="T:System.Globalization.TextElementEnumerator" /> for the entire string.</returns>
/// <param name="str">The string to iterate through. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="str" /> is null. </exception>
// Token: 0x060014A8 RID: 5288 RVA: 0x0004F9F8 File Offset: 0x0004DBF8
public static TextElementEnumerator GetTextElementEnumerator(string str)
{
if (str == null || str.Length == 0)
{
throw new ArgumentNullException("string is null");
}
return new TextElementEnumerator(str, 0);
}
/// <summary>Returns an enumerator that iterates through the text elements of the string, starting at the specified index.</summary>
/// <returns>A <see cref="T:System.Globalization.TextElementEnumerator" /> for the string starting at <paramref name="index" />.</returns>
/// <param name="str">The string to iterate through. </param>
/// <param name="index">The zero-based index at which to start iterating. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="str" /> is null. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="index" /> is outside the range of valid indexes for <paramref name="str" />. </exception>
// Token: 0x060014A9 RID: 5289 RVA: 0x0004FA20 File Offset: 0x0004DC20
public static TextElementEnumerator GetTextElementEnumerator(string str, int index)
{
if (str == null)
{
throw new ArgumentNullException("string is null");
}
if (index < 0 || index >= str.Length)
{
throw new ArgumentOutOfRangeException("Index is not valid");
}
return new TextElementEnumerator(str, index);
}
/// <summary>Returns the indexes of each base character, high surrogate, or control character within the specified string.</summary>
/// <returns>An array of integers that contains the zero-based indexes of each base character, high surrogate, or control character within the specified string.</returns>
/// <param name="str">The string to search. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="str" /> is null. </exception>
// Token: 0x060014AA RID: 5290 RVA: 0x0004FA64 File Offset: 0x0004DC64
public static int[] ParseCombiningCharacters(string str)
{
if (str == null)
{
throw new ArgumentNullException("string is null");
}
ArrayList arrayList = new ArrayList(str.Length);
TextElementEnumerator textElementEnumerator = StringInfo.GetTextElementEnumerator(str);
textElementEnumerator.Reset();
while (textElementEnumerator.MoveNext())
{
arrayList.Add(textElementEnumerator.ElementIndex);
}
return (int[])arrayList.ToArray(typeof(int));
}
// Token: 0x040005D8 RID: 1496
private string s;
// Token: 0x040005D9 RID: 1497
private int length;
}
}
@@ -0,0 +1,384 @@
using System;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>the Taiwan calendar.</summary>
// Token: 0x02000197 RID: 407
[ComVisible(true)]
[MonoTODO("Serialization format not compatible with.NET")]
[Serializable]
public class TaiwanCalendar : Calendar
{
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.TaiwanCalendar" /> class.</summary>
// Token: 0x060014AB RID: 5291 RVA: 0x0004FAD4 File Offset: 0x0004DCD4
public TaiwanCalendar()
{
this.M_AbbrEraNames = new string[] { "T.C.E." };
this.M_EraNames = new string[] { "Taiwan current era" };
}
// Token: 0x060014AC RID: 5292 RVA: 0x0004FB10 File Offset: 0x0004DD10
static TaiwanCalendar()
{
TaiwanCalendar.M_EraHandler.appendEra(1, CCGregorianCalendar.fixed_from_dmy(1, 1, 1912));
}
/// <summary>Gets the list of eras in the <see cref="T:System.Globalization.TaiwanCalendar" />.</summary>
/// <returns>An array that consists of a single element for which the value is always the current era.</returns>
// Token: 0x170003A8 RID: 936
// (get) Token: 0x060014AD RID: 5293 RVA: 0x0004FB6C File Offset: 0x0004DD6C
public override int[] Eras
{
get
{
return (int[])TaiwanCalendar.M_EraHandler.Eras.Clone();
}
}
/// <summary>Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.</summary>
/// <returns>The last year of a 100-year range that can be represented by a 2-digit year.</returns>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.RegistryPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x170003A9 RID: 937
// (get) Token: 0x060014AE RID: 5294 RVA: 0x0004FB84 File Offset: 0x0004DD84
// (set) Token: 0x060014AF RID: 5295 RVA: 0x0004FB8C File Offset: 0x0004DD8C
public override int TwoDigitYearMax
{
get
{
return this.twoDigitYearMax;
}
set
{
base.CheckReadOnly();
base.M_ArgumentInRange("value", value, 100, this.M_MaxYear);
this.twoDigitYearMax = value;
}
}
// Token: 0x060014B0 RID: 5296 RVA: 0x0004FBBC File Offset: 0x0004DDBC
internal void M_CheckDateTime(DateTime time)
{
TaiwanCalendar.M_EraHandler.CheckDateTime(time);
}
// Token: 0x060014B1 RID: 5297 RVA: 0x0004FBCC File Offset: 0x0004DDCC
internal void M_CheckEra(ref int era)
{
if (era == 0)
{
era = 1;
}
if (!TaiwanCalendar.M_EraHandler.ValidEra(era))
{
throw new ArgumentException("Era value was not valid.");
}
}
// Token: 0x060014B2 RID: 5298 RVA: 0x0004FC00 File Offset: 0x0004DE00
internal int M_CheckYEG(int year, ref int era)
{
this.M_CheckEra(ref era);
return TaiwanCalendar.M_EraHandler.GregorianYear(year, era);
}
// Token: 0x060014B3 RID: 5299 RVA: 0x0004FC18 File Offset: 0x0004DE18
internal override void M_CheckYE(int year, ref int era)
{
this.M_CheckYEG(year, ref era);
}
// Token: 0x060014B4 RID: 5300 RVA: 0x0004FC24 File Offset: 0x0004DE24
internal int M_CheckYMEG(int year, int month, ref int era)
{
int num = this.M_CheckYEG(year, ref era);
if (month < 1 || month > 12)
{
throw new ArgumentOutOfRangeException("month", "Month must be between one and twelve.");
}
return num;
}
// Token: 0x060014B5 RID: 5301 RVA: 0x0004FC5C File Offset: 0x0004DE5C
internal int M_CheckYMDEG(int year, int month, int day, ref int era)
{
int num = this.M_CheckYMEG(year, month, ref era);
base.M_ArgumentInRange("day", day, 1, this.GetDaysInMonth(year, month, era));
return num;
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of months away from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of months to the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add months. </param>
/// <param name="months">The number of months to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="months" /> is less than -120000.-or- <paramref name="months" /> is greater than 120000. </exception>
// Token: 0x060014B6 RID: 5302 RVA: 0x0004FC90 File Offset: 0x0004DE90
public override DateTime AddMonths(DateTime time, int months)
{
DateTime dateTime = CCGregorianCalendar.AddMonths(time, months);
this.M_CheckDateTime(dateTime);
return dateTime;
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of years away from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of years to the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add years. </param>
/// <param name="years">The number of years to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range. </exception>
// Token: 0x060014B7 RID: 5303 RVA: 0x0004FCB0 File Offset: 0x0004DEB0
public override DateTime AddYears(DateTime time, int years)
{
DateTime dateTime = CCGregorianCalendar.AddYears(time, years);
this.M_CheckDateTime(dateTime);
return dateTime;
}
/// <summary>Returns the day of the month in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 1 to 31 that represents the day of the month in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060014B8 RID: 5304 RVA: 0x0004FCD0 File Offset: 0x0004DED0
public override int GetDayOfMonth(DateTime time)
{
this.M_CheckDateTime(time);
return CCGregorianCalendar.GetDayOfMonth(time);
}
/// <summary>Returns the day of the week in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>A <see cref="T:System.DayOfWeek" /> value that represents the day of the week in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060014B9 RID: 5305 RVA: 0x0004FCE0 File Offset: 0x0004DEE0
public override DayOfWeek GetDayOfWeek(DateTime time)
{
this.M_CheckDateTime(time);
int num = CCFixed.FromDateTime(time);
return CCFixed.day_of_week(num);
}
/// <summary>Returns the day of the year in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 1 to 366 that represents the day of the year in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060014BA RID: 5306 RVA: 0x0004FD04 File Offset: 0x0004DF04
public override int GetDayOfYear(DateTime time)
{
this.M_CheckDateTime(time);
return CCGregorianCalendar.GetDayOfYear(time);
}
/// <summary>Returns the number of days in the specified month in the specified year in the specified era.</summary>
/// <returns>The number of days in the specified month in the specified year in the specified era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060014BB RID: 5307 RVA: 0x0004FD14 File Offset: 0x0004DF14
public override int GetDaysInMonth(int year, int month, int era)
{
int num = this.M_CheckYMEG(year, month, ref era);
return CCGregorianCalendar.GetDaysInMonth(num, month);
}
/// <summary>Returns the number of days in the specified year in the specified era.</summary>
/// <returns>The number of days in the specified year in the specified era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060014BC RID: 5308 RVA: 0x0004FD34 File Offset: 0x0004DF34
public override int GetDaysInYear(int year, int era)
{
int num = this.M_CheckYEG(year, ref era);
return CCGregorianCalendar.GetDaysInYear(num);
}
/// <summary>Returns the era in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer that represents the era in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060014BD RID: 5309 RVA: 0x0004FD54 File Offset: 0x0004DF54
public override int GetEra(DateTime time)
{
int num = CCFixed.FromDateTime(time);
int num2;
TaiwanCalendar.M_EraHandler.EraYear(out num2, num);
return num2;
}
/// <summary>Calculates the leap month for a specified year and era.</summary>
/// <returns>The return value is always 0 because the <see cref="T:System.Globalization.TaiwanCalendar" /> class does not support the notion of a leap month.</returns>
/// <param name="year">A year.</param>
/// <param name="era">An era.</param>
// Token: 0x060014BE RID: 5310 RVA: 0x0004FD78 File Offset: 0x0004DF78
[ComVisible(false)]
public override int GetLeapMonth(int year, int era)
{
return 0;
}
/// <summary>Returns the month in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 1 to 12 that represents the month in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060014BF RID: 5311 RVA: 0x0004FD7C File Offset: 0x0004DF7C
public override int GetMonth(DateTime time)
{
this.M_CheckDateTime(time);
return CCGregorianCalendar.GetMonth(time);
}
/// <summary>Returns the number of months in the specified year in the specified era.</summary>
/// <returns>The number of months in the specified year in the specified era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060014C0 RID: 5312 RVA: 0x0004FD8C File Offset: 0x0004DF8C
public override int GetMonthsInYear(int year, int era)
{
this.M_CheckYEG(year, ref era);
return 12;
}
/// <summary>Returns the week of the year that includes the date in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>A positive integer that represents the week of the year that includes the date in the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
/// <param name="rule">One of the <see cref="T:System.Globalization.CalendarWeekRule" /> values that defines a calendar week. </param>
/// <param name="firstDayOfWeek">One of the <see cref="T:System.DayOfWeek" /> values that represents the first day of the week. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="time" /> or <paramref name="firstDayOfWeek" /> is outside the range supported by the calendar.-or- <paramref name="rule" /> is not a valid <see cref="T:System.Globalization.CalendarWeekRule" /> value. </exception>
// Token: 0x060014C1 RID: 5313 RVA: 0x0004FD9C File Offset: 0x0004DF9C
[ComVisible(false)]
public override int GetWeekOfYear(DateTime time, CalendarWeekRule rule, DayOfWeek firstDayOfWeek)
{
return base.GetWeekOfYear(time, rule, firstDayOfWeek);
}
/// <summary>Returns the year in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer that represents the year in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060014C2 RID: 5314 RVA: 0x0004FDA8 File Offset: 0x0004DFA8
public override int GetYear(DateTime time)
{
int num = CCFixed.FromDateTime(time);
int num2;
return TaiwanCalendar.M_EraHandler.EraYear(out num2, num);
}
/// <summary>Determines whether the specified date in the specified era is a leap day.</summary>
/// <returns>true if the specified day is a leap day; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="day">An integer from 1 to 31 that represents the day. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="day" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060014C3 RID: 5315 RVA: 0x0004FDCC File Offset: 0x0004DFCC
public override bool IsLeapDay(int year, int month, int day, int era)
{
int num = this.M_CheckYMDEG(year, month, day, ref era);
return CCGregorianCalendar.IsLeapDay(num, month, day);
}
/// <summary>Determines whether the specified month in the specified year in the specified era is a leap month.</summary>
/// <returns>This method always returns false, unless overridden by a derived class.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060014C4 RID: 5316 RVA: 0x0004FDF0 File Offset: 0x0004DFF0
public override bool IsLeapMonth(int year, int month, int era)
{
this.M_CheckYMEG(year, month, ref era);
return false;
}
/// <summary>Determines whether the specified year in the specified era is a leap year.</summary>
/// <returns>true if the specified year is a leap year; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060014C5 RID: 5317 RVA: 0x0004FE00 File Offset: 0x0004E000
public override bool IsLeapYear(int year, int era)
{
int num = this.M_CheckYEG(year, ref era);
return CCGregorianCalendar.is_leap_year(num);
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is set to the specified date and time in the specified era.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that is set to the specified date and time in the current era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="day">An integer from 1 to 31 that represents the day. </param>
/// <param name="hour">An integer from 0 to 23 that represents the hour. </param>
/// <param name="minute">An integer from 0 to 59 that represents the minute. </param>
/// <param name="second">An integer from 0 to 59 that represents the second. </param>
/// <param name="millisecond">An integer from 0 to 999 that represents the millisecond. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="day" /> is outside the range supported by the calendar.-or- <paramref name="hour" /> is less than zero or greater than 23.-or- <paramref name="minute" /> is less than zero or greater than 59.-or- <paramref name="second" /> is less than zero or greater than 59.-or- <paramref name="millisecond" /> is less than zero or greater than 999.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060014C6 RID: 5318 RVA: 0x0004FE20 File Offset: 0x0004E020
public override DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era)
{
int num = this.M_CheckYMDEG(year, month, day, ref era);
base.M_CheckHMSM(hour, minute, second, millisecond);
return CCGregorianCalendar.ToDateTime(num, month, day, hour, minute, second, millisecond);
}
/// <summary>Converts the specified year to a four-digit year by using the <see cref="P:System.Globalization.TaiwanCalendar.TwoDigitYearMax" /> property to determine the appropriate century.</summary>
/// <returns>An integer that contains the four-digit representation of <paramref name="year" />.</returns>
/// <param name="year">A two-digit or four-digit integer that represents the year to convert. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar. </exception>
// Token: 0x060014C7 RID: 5319 RVA: 0x0004FE58 File Offset: 0x0004E058
public override int ToFourDigitYear(int year)
{
if (year < 0)
{
throw new ArgumentOutOfRangeException("year", "Non-negative number required.");
}
int num = 0;
this.M_CheckYE(year, ref num);
return year;
}
/// <summary>Gets the earliest date and time supported by the <see cref="T:System.Globalization.TaiwanCalendar" /> class.</summary>
/// <returns>The earliest date and time supported by the <see cref="T:System.Globalization.TaiwanCalendar" /> class, which is equivalent to the first moment of January 1, 1912 C.E. in the Gregorian calendar.</returns>
// Token: 0x170003AA RID: 938
// (get) Token: 0x060014C8 RID: 5320 RVA: 0x0004FE88 File Offset: 0x0004E088
[ComVisible(false)]
public override DateTime MinSupportedDateTime
{
get
{
return TaiwanCalendar.TaiwanMin;
}
}
/// <summary>Gets the latest date and time supported by the <see cref="T:System.Globalization.TaiwanCalendar" /> class.</summary>
/// <returns>The latest date and time supported by the <see cref="T:System.Globalization.TaiwanCalendar" /> class, which is equivalent to the last moment of December 31, 9999 C.E. in the Gregorian calendar.</returns>
// Token: 0x170003AB RID: 939
// (get) Token: 0x060014C9 RID: 5321 RVA: 0x0004FE90 File Offset: 0x0004E090
[ComVisible(false)]
public override DateTime MaxSupportedDateTime
{
get
{
return TaiwanCalendar.TaiwanMax;
}
}
// Token: 0x040005DA RID: 1498
internal static readonly CCGregorianEraHandler M_EraHandler = new CCGregorianEraHandler();
// Token: 0x040005DB RID: 1499
private static DateTime TaiwanMin = new DateTime(1912, 1, 1, 0, 0, 0);
// Token: 0x040005DC RID: 1500
private static DateTime TaiwanMax = new DateTime(9999, 12, 31, 11, 59, 59);
}
}
@@ -0,0 +1,84 @@
using System;
namespace System.Globalization
{
/// <summary>Represents the Taiwan lunisolar calendar. As for the Taiwan calendar, years are calculated using the Gregorian calendar, while days and months are calculated using the lunisolar calendar.</summary>
// Token: 0x02000198 RID: 408
[Serializable]
public class TaiwanLunisolarCalendar : EastAsianLunisolarCalendar
{
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.TaiwanLunisolarCalendar" /> class. </summary>
// Token: 0x060014CA RID: 5322 RVA: 0x0004FE98 File Offset: 0x0004E098
[MonoTODO]
public TaiwanLunisolarCalendar()
: base(TaiwanLunisolarCalendar.era_handler)
{
}
// Token: 0x060014CB RID: 5323 RVA: 0x0004FEA8 File Offset: 0x0004E0A8
static TaiwanLunisolarCalendar()
{
TaiwanLunisolarCalendar.era_handler.appendEra(1, CCFixed.FromDateTime(TaiwanLunisolarCalendar.TaiwanMin), CCFixed.FromDateTime(TaiwanLunisolarCalendar.TaiwanMax));
}
/// <summary>Gets the eras that are relevant to the current <see cref="T:System.Globalization.TaiwanLunisolarCalendar" /> object.</summary>
/// <returns>An array that consists of a single element having a value that is always the current era.</returns>
// Token: 0x170003AC RID: 940
// (get) Token: 0x060014CC RID: 5324 RVA: 0x0004FF10 File Offset: 0x0004E110
public override int[] Eras
{
get
{
return (int[])TaiwanLunisolarCalendar.era_handler.Eras.Clone();
}
}
/// <summary>Retrieves the era that corresponds to the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer that represents the era specified in the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060014CD RID: 5325 RVA: 0x0004FF28 File Offset: 0x0004E128
public override int GetEra(DateTime time)
{
int num = CCFixed.FromDateTime(time);
int num2;
TaiwanLunisolarCalendar.era_handler.EraYear(out num2, num);
return num2;
}
/// <summary>Gets the minimum date and time supported by the <see cref="T:System.Globalization.TaiwanLunisolarCalendar" /> class.</summary>
/// <returns>The earliest date and time supported by the <see cref="T:System.Globalization.TaiwanLunisolarCalendar" /> class, which is equivalent to the first moment of February 18, 1912 C.E. in the Gregorian calendar.</returns>
// Token: 0x170003AD RID: 941
// (get) Token: 0x060014CE RID: 5326 RVA: 0x0004FF4C File Offset: 0x0004E14C
public override DateTime MinSupportedDateTime
{
get
{
return TaiwanLunisolarCalendar.TaiwanMin;
}
}
/// <summary>Gets the maximum date and time supported by the <see cref="T:System.Globalization.TaiwanLunisolarCalendar" /> class.</summary>
/// <returns>The latest date and time supported by the <see cref="T:System.Globalization.TaiwanLunisolarCalendar" /> class, which is equivalent to the last moment of February 10, 2051 C.E. in the Gregorian calendar.</returns>
// Token: 0x170003AE RID: 942
// (get) Token: 0x060014CF RID: 5327 RVA: 0x0004FF54 File Offset: 0x0004E154
public override DateTime MaxSupportedDateTime
{
get
{
return TaiwanLunisolarCalendar.TaiwanMax;
}
}
// Token: 0x040005DD RID: 1501
private const int TaiwanEra = 1;
// Token: 0x040005DE RID: 1502
internal static readonly CCEastAsianLunisolarEraHandler era_handler = new CCEastAsianLunisolarEraHandler();
// Token: 0x040005DF RID: 1503
private static DateTime TaiwanMin = new DateTime(1912, 2, 18);
// Token: 0x040005E0 RID: 1504
private static DateTime TaiwanMax = new DateTime(2051, 2, 10, 23, 59, 59, 999);
}
}
@@ -0,0 +1,108 @@
using System;
using System.Collections;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Enumerates the text elements of a string. </summary>
// Token: 0x02000199 RID: 409
[ComVisible(true)]
[Serializable]
public class TextElementEnumerator : IEnumerator
{
// Token: 0x060014D0 RID: 5328 RVA: 0x0004FF5C File Offset: 0x0004E15C
internal TextElementEnumerator(string str, int startpos)
{
this.index = -1;
this.startpos = startpos;
this.str = str.Substring(startpos);
this.element = null;
}
/// <summary>Gets the current text element in the string.</summary>
/// <returns>An object containing the current text element in the string.</returns>
/// <exception cref="T:System.InvalidOperationException">The enumerator is positioned before the first text element of the string or after the last text element. </exception>
// Token: 0x170003AF RID: 943
// (get) Token: 0x060014D1 RID: 5329 RVA: 0x0004FF94 File Offset: 0x0004E194
public object Current
{
get
{
if (this.element == null)
{
throw new InvalidOperationException();
}
return this.element;
}
}
/// <summary>Gets the index of the text element that the enumerator is currently positioned over.</summary>
/// <returns>The index of the text element that the enumerator is currently positioned over.</returns>
/// <exception cref="T:System.InvalidOperationException">The enumerator is positioned before the first text element of the string or after the last text element. </exception>
// Token: 0x170003B0 RID: 944
// (get) Token: 0x060014D2 RID: 5330 RVA: 0x0004FFB0 File Offset: 0x0004E1B0
public int ElementIndex
{
get
{
if (this.element == null)
{
throw new InvalidOperationException();
}
return this.elementindex + this.startpos;
}
}
/// <summary>Gets the current text element in the string.</summary>
/// <returns>A new string containing the current text element in the string being read.</returns>
/// <exception cref="T:System.InvalidOperationException">The enumerator is positioned before the first text element of the string or after the last text element. </exception>
// Token: 0x060014D3 RID: 5331 RVA: 0x0004FFD0 File Offset: 0x0004E1D0
public string GetTextElement()
{
if (this.element == null)
{
throw new InvalidOperationException();
}
return this.element;
}
/// <summary>Advances the enumerator to the next text element of the string.</summary>
/// <returns>true if the enumerator was successfully advanced to the next text element; false if the enumerator has passed the end of the string.</returns>
// Token: 0x060014D4 RID: 5332 RVA: 0x0004FFEC File Offset: 0x0004E1EC
public bool MoveNext()
{
this.elementindex = this.index + 1;
if (this.elementindex < this.str.Length)
{
this.element = StringInfo.GetNextTextElement(this.str, this.elementindex);
this.index += this.element.Length;
return true;
}
this.element = null;
return false;
}
/// <summary>Sets the enumerator to its initial position, which is before the first text element in the string.</summary>
// Token: 0x060014D5 RID: 5333 RVA: 0x00050058 File Offset: 0x0004E258
public void Reset()
{
this.element = null;
this.index = -1;
}
// Token: 0x040005E1 RID: 1505
private int index;
// Token: 0x040005E2 RID: 1506
private int elementindex;
// Token: 0x040005E3 RID: 1507
private int startpos;
// Token: 0x040005E4 RID: 1508
private string str;
// Token: 0x040005E5 RID: 1509
private string element;
}
}
+646
View File
@@ -0,0 +1,646 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Text;
namespace System.Globalization
{
/// <summary>Defines text properties and behaviors, such as casing, that are specific to a writing system. </summary>
// Token: 0x0200019A RID: 410
[ComVisible(true)]
[MonoTODO("IDeserializationCallback isn't implemented.")]
[Serializable]
public class TextInfo : ICloneable, IDeserializationCallback
{
// Token: 0x060014D6 RID: 5334 RVA: 0x00050068 File Offset: 0x0004E268
internal unsafe TextInfo(CultureInfo ci, int lcid, void* data, bool read_only)
{
this.m_isReadOnly = read_only;
this.m_win32LangID = lcid;
this.ci = ci;
if (data != null)
{
this.data = *(TextInfo.Data*)data;
}
else
{
this.data = default(TextInfo.Data);
this.data.list_sep = 44;
}
CultureInfo cultureInfo = ci;
while (cultureInfo.Parent != null && cultureInfo.Parent.LCID != 127 && cultureInfo.Parent != cultureInfo)
{
cultureInfo = cultureInfo.Parent;
}
if (cultureInfo != null)
{
int lcid2 = cultureInfo.LCID;
if (lcid2 == 31 || lcid2 == 44)
{
this.handleDotI = true;
}
}
}
// Token: 0x060014D7 RID: 5335 RVA: 0x0005012C File Offset: 0x0004E32C
private TextInfo(TextInfo textInfo)
{
this.m_win32LangID = textInfo.m_win32LangID;
this.m_nDataItem = textInfo.m_nDataItem;
this.m_useUserOverride = textInfo.m_useUserOverride;
this.m_listSeparator = textInfo.ListSeparator;
this.customCultureName = textInfo.CultureName;
this.ci = textInfo.ci;
this.handleDotI = textInfo.handleDotI;
this.data = textInfo.data;
}
/// <summary>Raises the deserialization event when deserialization is complete.</summary>
/// <param name="sender">The source of the deserialization event. </param>
// Token: 0x060014D8 RID: 5336 RVA: 0x000501A0 File Offset: 0x0004E3A0
[MonoTODO]
void IDeserializationCallback.OnDeserialization(object sender)
{
}
/// <summary>Gets the American National Standards Institute (ANSI) code page used by the writing system represented by the current <see cref="T:System.Globalization.TextInfo" />.</summary>
/// <returns>The ANSI code page used by the writing system represented by the current <see cref="T:System.Globalization.TextInfo" />.</returns>
// Token: 0x170003B1 RID: 945
// (get) Token: 0x060014D9 RID: 5337 RVA: 0x000501A4 File Offset: 0x0004E3A4
public virtual int ANSICodePage
{
get
{
return this.data.ansi;
}
}
/// <summary>Gets the Extended Binary Coded Decimal Interchange Code (EBCDIC) code page used by the writing system represented by the current <see cref="T:System.Globalization.TextInfo" />.</summary>
/// <returns>The EBCDIC code page used by the writing system represented by the current <see cref="T:System.Globalization.TextInfo" />.</returns>
// Token: 0x170003B2 RID: 946
// (get) Token: 0x060014DA RID: 5338 RVA: 0x000501C0 File Offset: 0x0004E3C0
public virtual int EBCDICCodePage
{
get
{
return this.data.ebcdic;
}
}
/// <summary>Gets the culture identifier for the culture associated with the current <see cref="T:System.Globalization.TextInfo" /> object.</summary>
/// <returns>A number that identifies the culture from which the current <see cref="T:System.Globalization.TextInfo" /> object was created.</returns>
// Token: 0x170003B3 RID: 947
// (get) Token: 0x060014DB RID: 5339 RVA: 0x000501DC File Offset: 0x0004E3DC
[ComVisible(false)]
public int LCID
{
get
{
return this.m_win32LangID;
}
}
/// <summary>Gets or sets the string that separates items in a list.</summary>
/// <returns>The string that separates items in a list.</returns>
/// <exception cref="T:System.ArgumentNullException">The value in a set operation is null.</exception>
/// <exception cref="T:System.InvalidOperationException">In a set operation, the current <see cref="T:System.Globalization.TextInfo" /> object is read-only.</exception>
// Token: 0x170003B4 RID: 948
// (get) Token: 0x060014DC RID: 5340 RVA: 0x000501E4 File Offset: 0x0004E3E4
// (set) Token: 0x060014DD RID: 5341 RVA: 0x00050220 File Offset: 0x0004E420
public virtual string ListSeparator
{
get
{
if (this.m_listSeparator == null)
{
this.m_listSeparator = ((char)this.data.list_sep).ToString();
}
return this.m_listSeparator;
}
[ComVisible(false)]
set
{
this.m_listSeparator = value;
}
}
/// <summary>Gets the Macintosh code page used by the writing system represented by the current <see cref="T:System.Globalization.TextInfo" />.</summary>
/// <returns>The Macintosh code page used by the writing system represented by the current <see cref="T:System.Globalization.TextInfo" />.</returns>
// Token: 0x170003B5 RID: 949
// (get) Token: 0x060014DE RID: 5342 RVA: 0x0005022C File Offset: 0x0004E42C
public virtual int MacCodePage
{
get
{
return this.data.mac;
}
}
/// <summary>Gets the original equipment manufacturer (OEM) code page used by the writing system represented by the current <see cref="T:System.Globalization.TextInfo" />.</summary>
/// <returns>The OEM code page used by the writing system represented by the current <see cref="T:System.Globalization.TextInfo" />.</returns>
// Token: 0x170003B6 RID: 950
// (get) Token: 0x060014DF RID: 5343 RVA: 0x00050248 File Offset: 0x0004E448
public virtual int OEMCodePage
{
get
{
return this.data.oem;
}
}
/// <summary>Gets the name of the culture associated with the current <see cref="T:System.Globalization.TextInfo" /> object.</summary>
/// <returns>The name of a culture. </returns>
// Token: 0x170003B7 RID: 951
// (get) Token: 0x060014E0 RID: 5344 RVA: 0x00050264 File Offset: 0x0004E464
[ComVisible(false)]
public string CultureName
{
get
{
if (this.customCultureName == null)
{
this.customCultureName = this.ci.Name;
}
return this.customCultureName;
}
}
/// <summary>Gets a value indicating whether the current <see cref="T:System.Globalization.TextInfo" /> object is read-only.</summary>
/// <returns>true if the current <see cref="T:System.Globalization.TextInfo" /> object is read-only; otherwise, false.</returns>
// Token: 0x170003B8 RID: 952
// (get) Token: 0x060014E1 RID: 5345 RVA: 0x00050294 File Offset: 0x0004E494
[ComVisible(false)]
public bool IsReadOnly
{
get
{
return this.m_isReadOnly;
}
}
/// <summary>Gets a value indicating whether the current <see cref="T:System.Globalization.TextInfo" /> object represents a writing system where text flows from right to left.</summary>
/// <returns>true if text flows from right to left; otherwise, false.</returns>
// Token: 0x170003B9 RID: 953
// (get) Token: 0x060014E2 RID: 5346 RVA: 0x0005029C File Offset: 0x0004E49C
[ComVisible(false)]
public bool IsRightToLeft
{
get
{
int win32LangID = this.m_win32LangID;
return win32LangID == 1 || win32LangID == 13 || win32LangID == 32 || win32LangID == 41 || win32LangID == 90 || win32LangID == 101 || win32LangID == 1025 || win32LangID == 1037 || win32LangID == 1056 || win32LangID == 1065 || win32LangID == 1114 || win32LangID == 1125 || win32LangID == 2049 || win32LangID == 3073 || win32LangID == 4097 || win32LangID == 5121 || win32LangID == 6145 || win32LangID == 7169 || win32LangID == 8193 || win32LangID == 9217 || win32LangID == 10241 || win32LangID == 11265 || win32LangID == 12289 || win32LangID == 13313 || win32LangID == 14337 || win32LangID == 15361 || win32LangID == 16385;
}
}
/// <summary>Determines whether the specified object represents the same writing system as the current <see cref="T:System.Globalization.TextInfo" /> object.</summary>
/// <returns>true if <paramref name="obj" /> represents the same writing system as the current <see cref="T:System.Globalization.TextInfo" />; otherwise, false.</returns>
/// <param name="obj">The object to compare with the current <see cref="T:System.Globalization.TextInfo" />. </param>
// Token: 0x060014E3 RID: 5347 RVA: 0x000503D0 File Offset: 0x0004E5D0
public override bool Equals(object obj)
{
if (obj == null)
{
return false;
}
TextInfo textInfo = obj as TextInfo;
return textInfo != null && textInfo.m_win32LangID == this.m_win32LangID && textInfo.ci == this.ci;
}
/// <summary>Serves as a hash function for the current <see cref="T:System.Globalization.TextInfo" />, suitable for hashing algorithms and data structures, such as a hash table.</summary>
/// <returns>A hash code for the current <see cref="T:System.Globalization.TextInfo" />.</returns>
// Token: 0x060014E4 RID: 5348 RVA: 0x0005041C File Offset: 0x0004E61C
public override int GetHashCode()
{
return this.m_win32LangID;
}
/// <summary>Returns a string that represents the current <see cref="T:System.Globalization.TextInfo" />.</summary>
/// <returns>A string that represents the current <see cref="T:System.Globalization.TextInfo" />.</returns>
// Token: 0x060014E5 RID: 5349 RVA: 0x00050424 File Offset: 0x0004E624
public override string ToString()
{
return "TextInfo - " + this.m_win32LangID;
}
/// <summary>Converts the specified string to titlecase.</summary>
/// <returns>The specified string converted to titlecase.</returns>
/// <param name="str">The string to convert to titlecase. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="str" /> is null. </exception>
// Token: 0x060014E6 RID: 5350 RVA: 0x0005043C File Offset: 0x0004E63C
public string ToTitleCase(string str)
{
if (str == null)
{
throw new ArgumentNullException("str");
}
StringBuilder stringBuilder = null;
int i = 0;
int num = 0;
while (i < str.Length)
{
if (char.IsLetter(str[i++]))
{
i--;
char c = this.ToTitleCase(str[i]);
bool flag = true;
if (c == str[i])
{
flag = false;
bool flag2 = true;
int num2 = i;
while (++i < str.Length)
{
if (char.IsWhiteSpace(str[i]))
{
break;
}
c = this.ToTitleCase(str[i]);
if (c != str[i])
{
flag2 = false;
break;
}
}
if (flag2)
{
continue;
}
i = num2;
while (++i < str.Length)
{
if (char.IsWhiteSpace(str[i]))
{
break;
}
if (this.ToLower(str[i]) != str[i])
{
flag = true;
i = num2;
break;
}
}
}
if (flag)
{
if (stringBuilder == null)
{
stringBuilder = new StringBuilder(str.Length);
}
stringBuilder.Append(str, num, i - num);
stringBuilder.Append(this.ToTitleCase(str[i]));
num = i + 1;
while (++i < str.Length)
{
if (char.IsWhiteSpace(str[i]))
{
break;
}
stringBuilder.Append(this.ToLower(str[i]));
}
num = i;
}
}
}
if (stringBuilder != null)
{
stringBuilder.Append(str, num, str.Length - num);
}
return (stringBuilder == null) ? str : stringBuilder.ToString();
}
/// <summary>Converts the specified character to lowercase.</summary>
/// <returns>The specified character converted to lowercase.</returns>
/// <param name="c">The character to convert to lowercase. </param>
// Token: 0x060014E7 RID: 5351 RVA: 0x0005060C File Offset: 0x0004E80C
public virtual char ToLower(char c)
{
if (c < '@' || ('`' < c && c < '\u0080'))
{
return c;
}
if ('A' <= c && c <= 'Z' && (!this.handleDotI || c != 'I'))
{
return c + ' ';
}
if (this.ci == null || this.ci.LCID == 127)
{
return char.ToLowerInvariant(c);
}
switch (c)
{
case 'Dž':
return 'dž';
default:
switch (c)
{
case 'ϒ':
return 'υ';
case 'ϓ':
return 'ύ';
case 'ϔ':
return 'ϋ';
default:
if (c != 'I')
{
if (c == 'İ')
{
return 'i';
}
if (c == 'Nj')
{
return 'nj';
}
if (c == 'Dz')
{
return 'dz';
}
}
else if (this.handleDotI)
{
return 'ı';
}
return char.ToLowerInvariant(c);
}
break;
case 'Lj':
return 'lj';
}
}
/// <summary>Converts the specified character to uppercase.</summary>
/// <returns>The specified character converted to uppercase.</returns>
/// <param name="c">The character to convert to uppercase. </param>
// Token: 0x060014E8 RID: 5352 RVA: 0x00050730 File Offset: 0x0004E930
public virtual char ToUpper(char c)
{
if (c < '`')
{
return c;
}
if ('a' <= c && c <= 'z' && (!this.handleDotI || c != 'i'))
{
return c - ' ';
}
if (this.ci == null || this.ci.LCID == 127)
{
return char.ToUpperInvariant(c);
}
switch (c)
{
case 'ϐ':
return 'Β';
case 'ϑ':
return 'Θ';
default:
switch (c)
{
case 'Dž':
return 'DŽ';
default:
if (c == 'ϰ')
{
return 'Κ';
}
if (c != 'ϱ')
{
if (c != 'i')
{
if (c == 'ı')
{
return 'I';
}
if (c == 'Nj')
{
return 'NJ';
}
if (c == 'Dz')
{
return 'DZ';
}
if (c == 'ΐ')
{
return 'Ϊ';
}
if (c == 'ΰ')
{
return 'Ϋ';
}
}
else if (this.handleDotI)
{
return 'İ';
}
return char.ToUpperInvariant(c);
}
return 'Ρ';
case 'Lj':
return 'LJ';
}
break;
case 'ϕ':
return 'Φ';
case 'ϖ':
return 'Π';
}
}
// Token: 0x060014E9 RID: 5353 RVA: 0x0005089C File Offset: 0x0004EA9C
private char ToTitleCase(char c)
{
switch (c)
{
case 'DŽ':
case 'Dž':
case 'dž':
return 'Dž';
case 'LJ':
case 'Lj':
case 'lj':
return 'Lj';
case 'NJ':
case 'Nj':
case 'nj':
return 'Nj';
default:
switch (c)
{
case 'DZ':
case 'Dz':
case 'dz':
return 'Dz';
default:
if (('' <= c && c <= 'ⅿ') || ('ⓐ' <= c && c <= 'ⓩ'))
{
return c;
}
return this.ToUpper(c);
}
break;
}
}
/// <summary>Converts the specified string to lowercase.</summary>
/// <returns>The specified string converted to lowercase.</returns>
/// <param name="str">The string to convert to lowercase. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="str" /> is null. </exception>
// Token: 0x060014EA RID: 5354 RVA: 0x00050948 File Offset: 0x0004EB48
public unsafe virtual string ToLower(string str)
{
if (str == null)
{
throw new ArgumentNullException("str");
}
if (str.Length == 0)
{
return string.Empty;
}
string text = string.InternalAllocateStr(str.Length);
fixed (string text2 = str)
{
fixed (char* ptr = text2 + RuntimeHelpers.OffsetToStringData / 2)
{
fixed (string text3 = text)
{
fixed (char* ptr2 = text3 + RuntimeHelpers.OffsetToStringData / 2)
{
char* ptr3 = ptr2;
char* ptr4 = ptr;
for (int i = 0; i < str.Length; i++)
{
*ptr3 = this.ToLower(*ptr4);
ptr4++;
ptr3++;
}
text2 = null;
text3 = null;
return text;
}
}
}
}
}
/// <summary>Converts the specified string to uppercase.</summary>
/// <returns>The specified string converted to uppercase.</returns>
/// <param name="str">The string to convert to uppercase. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="str" /> is null. </exception>
// Token: 0x060014EB RID: 5355 RVA: 0x000509DC File Offset: 0x0004EBDC
public unsafe virtual string ToUpper(string str)
{
if (str == null)
{
throw new ArgumentNullException("str");
}
if (str.Length == 0)
{
return string.Empty;
}
string text = string.InternalAllocateStr(str.Length);
fixed (string text2 = str)
{
fixed (char* ptr = text2 + RuntimeHelpers.OffsetToStringData / 2)
{
fixed (string text3 = text)
{
fixed (char* ptr2 = text3 + RuntimeHelpers.OffsetToStringData / 2)
{
char* ptr3 = ptr2;
char* ptr4 = ptr;
for (int i = 0; i < str.Length; i++)
{
*ptr3 = this.ToUpper(*ptr4);
ptr4++;
ptr3++;
}
text2 = null;
text3 = null;
return text;
}
}
}
}
}
/// <summary>Returns a read-only version of the specified <see cref="T:System.Globalization.TextInfo" /> object.</summary>
/// <returns>The <see cref="T:System.Globalization.TextInfo" /> object specified by the <paramref name="textInfo" /> parameter, if <paramref name="textInfo" /> is read-only.-or-A read-only memberwise clone of the <see cref="T:System.Globalization.TextInfo" /> object specified by <paramref name="textInfo" />, if <paramref name="textInfo" /> is not read-only.</returns>
/// <param name="textInfo">A <see cref="T:System.Globalization.TextInfo" /> object.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="textInfo" /> is null.</exception>
// Token: 0x060014EC RID: 5356 RVA: 0x00050A70 File Offset: 0x0004EC70
[ComVisible(false)]
public static TextInfo ReadOnly(TextInfo textInfo)
{
if (textInfo == null)
{
throw new ArgumentNullException("textInfo");
}
return new TextInfo(textInfo)
{
m_isReadOnly = true
};
}
/// <summary>Creates a new object that is a copy of the current <see cref="T:System.Globalization.TextInfo" /> object.</summary>
/// <returns>A new instance of <see cref="T:System.Object" /> that is the memberwise clone of the current <see cref="T:System.Globalization.TextInfo" /> object.</returns>
// Token: 0x060014ED RID: 5357 RVA: 0x00050AA0 File Offset: 0x0004ECA0
[ComVisible(false)]
public virtual object Clone()
{
return new TextInfo(this);
}
// Token: 0x040005E6 RID: 1510
private string m_listSeparator;
// Token: 0x040005E7 RID: 1511
private bool m_isReadOnly;
// Token: 0x040005E8 RID: 1512
private string customCultureName;
// Token: 0x040005E9 RID: 1513
[NonSerialized]
private int m_nDataItem;
// Token: 0x040005EA RID: 1514
private bool m_useUserOverride;
// Token: 0x040005EB RID: 1515
private int m_win32LangID;
// Token: 0x040005EC RID: 1516
[NonSerialized]
private readonly CultureInfo ci;
// Token: 0x040005ED RID: 1517
[NonSerialized]
private readonly bool handleDotI;
// Token: 0x040005EE RID: 1518
[NonSerialized]
private readonly TextInfo.Data data;
// Token: 0x0200019B RID: 411
private struct Data
{
// Token: 0x040005EF RID: 1519
public int ansi;
// Token: 0x040005F0 RID: 1520
public int ebcdic;
// Token: 0x040005F1 RID: 1521
public int mac;
// Token: 0x040005F2 RID: 1522
public int oem;
// Token: 0x040005F3 RID: 1523
public byte list_sep;
}
}
}
@@ -0,0 +1,375 @@
using System;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Represents the Thai Buddhist calendar.</summary>
// Token: 0x0200019C RID: 412
[MonoTODO("Serialization format not compatible with.NET")]
[ComVisible(true)]
[Serializable]
public class ThaiBuddhistCalendar : Calendar
{
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.ThaiBuddhistCalendar" /> class.</summary>
// Token: 0x060014EE RID: 5358 RVA: 0x00050AA8 File Offset: 0x0004ECA8
public ThaiBuddhistCalendar()
{
this.M_AbbrEraNames = new string[] { "T.B.C.E." };
this.M_EraNames = new string[] { "ThaiBuddhist current era" };
if (this.twoDigitYearMax == 99)
{
this.twoDigitYearMax = 2572;
}
}
// Token: 0x060014EF RID: 5359 RVA: 0x00050AFC File Offset: 0x0004ECFC
static ThaiBuddhistCalendar()
{
ThaiBuddhistCalendar.M_EraHandler.appendEra(1, CCGregorianCalendar.fixed_from_dmy(1, 1, -542));
}
/// <summary>Gets the list of eras in the <see cref="T:System.Globalization.ThaiBuddhistCalendar" /> class.</summary>
/// <returns>An array that consists of a single element having a value that is always the current era.</returns>
// Token: 0x170003BA RID: 954
// (get) Token: 0x060014F0 RID: 5360 RVA: 0x00050B54 File Offset: 0x0004ED54
public override int[] Eras
{
get
{
return (int[])ThaiBuddhistCalendar.M_EraHandler.Eras.Clone();
}
}
/// <summary>Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.</summary>
/// <returns>The last year of a 100-year range that can be represented by a 2-digit year.</returns>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.RegistryPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x170003BB RID: 955
// (get) Token: 0x060014F1 RID: 5361 RVA: 0x00050B6C File Offset: 0x0004ED6C
// (set) Token: 0x060014F2 RID: 5362 RVA: 0x00050B74 File Offset: 0x0004ED74
public override int TwoDigitYearMax
{
get
{
return this.twoDigitYearMax;
}
set
{
base.CheckReadOnly();
base.M_ArgumentInRange("value", value, 100, this.M_MaxYear);
this.twoDigitYearMax = value;
}
}
// Token: 0x060014F3 RID: 5363 RVA: 0x00050BA4 File Offset: 0x0004EDA4
internal void M_CheckEra(ref int era)
{
if (era == 0)
{
era = 1;
}
if (!ThaiBuddhistCalendar.M_EraHandler.ValidEra(era))
{
throw new ArgumentException("Era value was not valid.");
}
}
// Token: 0x060014F4 RID: 5364 RVA: 0x00050BD8 File Offset: 0x0004EDD8
internal int M_CheckYEG(int year, ref int era)
{
this.M_CheckEra(ref era);
return ThaiBuddhistCalendar.M_EraHandler.GregorianYear(year, era);
}
// Token: 0x060014F5 RID: 5365 RVA: 0x00050BF0 File Offset: 0x0004EDF0
internal override void M_CheckYE(int year, ref int era)
{
this.M_CheckYEG(year, ref era);
}
// Token: 0x060014F6 RID: 5366 RVA: 0x00050BFC File Offset: 0x0004EDFC
internal int M_CheckYMEG(int year, int month, ref int era)
{
int num = this.M_CheckYEG(year, ref era);
if (month < 1 || month > 12)
{
throw new ArgumentOutOfRangeException("month", "Month must be between one and twelve.");
}
return num;
}
// Token: 0x060014F7 RID: 5367 RVA: 0x00050C34 File Offset: 0x0004EE34
internal int M_CheckYMDEG(int year, int month, int day, ref int era)
{
int num = this.M_CheckYMEG(year, month, ref era);
base.M_ArgumentInRange("day", day, 1, this.GetDaysInMonth(year, month, era));
return num;
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of months away from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of months to the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add months. </param>
/// <param name="months">The number of months to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="months" /> is less than -120000.-or- <paramref name="months" /> is greater than 120000. </exception>
// Token: 0x060014F8 RID: 5368 RVA: 0x00050C68 File Offset: 0x0004EE68
public override DateTime AddMonths(DateTime time, int months)
{
return CCGregorianCalendar.AddMonths(time, months);
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of years away from the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of years to the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add years. </param>
/// <param name="years">The number of years to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range. </exception>
// Token: 0x060014F9 RID: 5369 RVA: 0x00050C74 File Offset: 0x0004EE74
public override DateTime AddYears(DateTime time, int years)
{
return CCGregorianCalendar.AddYears(time, years);
}
/// <summary>Returns the day of the month in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 1 to 31 that represents the day of the month in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060014FA RID: 5370 RVA: 0x00050C80 File Offset: 0x0004EE80
public override int GetDayOfMonth(DateTime time)
{
return CCGregorianCalendar.GetDayOfMonth(time);
}
/// <summary>Returns the day of the week in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>A <see cref="T:System.DayOfWeek" /> value that represents the day of the week in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060014FB RID: 5371 RVA: 0x00050C88 File Offset: 0x0004EE88
public override DayOfWeek GetDayOfWeek(DateTime time)
{
int num = CCFixed.FromDateTime(time);
return CCFixed.day_of_week(num);
}
/// <summary>Returns the day of the year in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 1 to 366 that represents the day of the year in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060014FC RID: 5372 RVA: 0x00050CA4 File Offset: 0x0004EEA4
public override int GetDayOfYear(DateTime time)
{
return CCGregorianCalendar.GetDayOfYear(time);
}
/// <summary>Returns the number of days in the specified month in the specified year in the specified era.</summary>
/// <returns>The number of days in the specified month in the specified year in the specified era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060014FD RID: 5373 RVA: 0x00050CAC File Offset: 0x0004EEAC
public override int GetDaysInMonth(int year, int month, int era)
{
int num = this.M_CheckYMEG(year, month, ref era);
return CCGregorianCalendar.GetDaysInMonth(num, month);
}
/// <summary>Returns the number of days in the specified year in the specified era.</summary>
/// <returns>The number of days in the specified year in the specified era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x060014FE RID: 5374 RVA: 0x00050CCC File Offset: 0x0004EECC
public override int GetDaysInYear(int year, int era)
{
int num = this.M_CheckYEG(year, ref era);
return CCGregorianCalendar.GetDaysInYear(num);
}
/// <summary>Returns the era in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer that represents the era in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x060014FF RID: 5375 RVA: 0x00050CEC File Offset: 0x0004EEEC
public override int GetEra(DateTime time)
{
int num = CCFixed.FromDateTime(time);
int num2;
ThaiBuddhistCalendar.M_EraHandler.EraYear(out num2, num);
return num2;
}
/// <summary>Calculates the leap month for a specified year and era.</summary>
/// <returns>The return value is always 0 because the <see cref="T:System.Globalization.ThaiBuddhistCalendar" /> class does not support the notion of a leap month.</returns>
/// <param name="year">A year.</param>
/// <param name="era">An era.</param>
// Token: 0x06001500 RID: 5376 RVA: 0x00050D10 File Offset: 0x0004EF10
[ComVisible(false)]
public override int GetLeapMonth(int year, int era)
{
return 0;
}
/// <summary>Returns the month in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer from 1 to 12 that represents the month in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x06001501 RID: 5377 RVA: 0x00050D14 File Offset: 0x0004EF14
public override int GetMonth(DateTime time)
{
return CCGregorianCalendar.GetMonth(time);
}
/// <summary>Returns the number of months in the specified year in the specified era.</summary>
/// <returns>The number of months in the specified year in the specified era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x06001502 RID: 5378 RVA: 0x00050D1C File Offset: 0x0004EF1C
public override int GetMonthsInYear(int year, int era)
{
this.M_CheckYE(year, ref era);
return 12;
}
/// <summary>Returns the week of the year that includes the date in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>A 1-based positive integer that represents the week of the year that includes the date in the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
/// <param name="rule">One of the <see cref="T:System.Globalization.CalendarWeekRule" /> values that defines a calendar week. </param>
/// <param name="firstDayOfWeek">One of the <see cref="T:System.DayOfWeek" /> values that represents the first day of the week. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="time" /> or <paramref name="firstDayOfWeek" /> is outside the range supported by the calendar.-or- <paramref name="rule" /> is not a valid <see cref="T:System.Globalization.CalendarWeekRule" /> value. </exception>
// Token: 0x06001503 RID: 5379 RVA: 0x00050D2C File Offset: 0x0004EF2C
[ComVisible(false)]
public override int GetWeekOfYear(DateTime time, CalendarWeekRule rule, DayOfWeek firstDayOfWeek)
{
return base.GetWeekOfYear(time, rule, firstDayOfWeek);
}
/// <summary>Returns the year in the specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer that represents the year in the specified <see cref="T:System.DateTime" />.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
// Token: 0x06001504 RID: 5380 RVA: 0x00050D38 File Offset: 0x0004EF38
public override int GetYear(DateTime time)
{
int num = CCFixed.FromDateTime(time);
int num2;
return ThaiBuddhistCalendar.M_EraHandler.EraYear(out num2, num);
}
/// <summary>Determines whether the specified date in the specified era is a leap day.</summary>
/// <returns>true if the specified day is a leap day; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="day">An integer from 1 to 31 that represents the day. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="day" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x06001505 RID: 5381 RVA: 0x00050D5C File Offset: 0x0004EF5C
public override bool IsLeapDay(int year, int month, int day, int era)
{
int num = this.M_CheckYMDEG(year, month, day, ref era);
return CCGregorianCalendar.IsLeapDay(num, month, day);
}
/// <summary>Determines whether the specified month in the specified year in the specified era is a leap month.</summary>
/// <returns>This method always returns false, unless overridden by a derived class.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x06001506 RID: 5382 RVA: 0x00050D80 File Offset: 0x0004EF80
public override bool IsLeapMonth(int year, int month, int era)
{
this.M_CheckYMEG(year, month, ref era);
return false;
}
/// <summary>Determines whether the specified year in the specified era is a leap year.</summary>
/// <returns>true if the specified year is a leap year; otherwise, false.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x06001507 RID: 5383 RVA: 0x00050D90 File Offset: 0x0004EF90
public override bool IsLeapYear(int year, int era)
{
int num = this.M_CheckYEG(year, ref era);
return CCGregorianCalendar.is_leap_year(num);
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is set to the specified date and time in the specified era.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that is set to the specified date and time in the current era.</returns>
/// <param name="year">An integer that represents the year. </param>
/// <param name="month">An integer from 1 to 12 that represents the month. </param>
/// <param name="day">An integer from 1 to 31 that represents the day. </param>
/// <param name="hour">An integer from 0 to 23 that represents the hour. </param>
/// <param name="minute">An integer from 0 to 59 that represents the minute. </param>
/// <param name="second">An integer from 0 to 59 that represents the second. </param>
/// <param name="millisecond">An integer from 0 to 999 that represents the millisecond. </param>
/// <param name="era">An integer that represents the era. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="day" /> is outside the range supported by the calendar.-or- <paramref name="hour" /> is less than zero or greater than 23.-or- <paramref name="minute" /> is less than zero or greater than 59.-or- <paramref name="second" /> is less than zero or greater than 59.-or- <paramref name="millisecond" /> is less than zero or greater than 999.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
// Token: 0x06001508 RID: 5384 RVA: 0x00050DB0 File Offset: 0x0004EFB0
public override DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era)
{
int num = this.M_CheckYMDEG(year, month, day, ref era);
base.M_CheckHMSM(hour, minute, second, millisecond);
return CCGregorianCalendar.ToDateTime(num, month, day, hour, minute, second, millisecond);
}
/// <summary>Converts the specified year to a four-digit year by using the <see cref="P:System.Globalization.ThaiBuddhistCalendar.TwoDigitYearMax" /> property to determine the appropriate century.</summary>
/// <returns>An integer that contains the four-digit representation of <paramref name="year" />.</returns>
/// <param name="year">A two-digit or four-digit integer that represents the year to convert. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by the calendar. </exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.RegistryPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="\" />
/// </PermissionSet>
// Token: 0x06001509 RID: 5385 RVA: 0x00050DE8 File Offset: 0x0004EFE8
public override int ToFourDigitYear(int year)
{
return base.ToFourDigitYear(year);
}
/// <summary>Gets the earliest date and time supported by the <see cref="T:System.Globalization.ThaiBuddhistCalendar" /> class.</summary>
/// <returns>The earliest date and time supported by the <see cref="T:System.Globalization.ThaiBuddhistCalendar" /> class, which is equivalent to the first moment of January 1, 0001 C.E. in the Gregorian calendar.</returns>
// Token: 0x170003BC RID: 956
// (get) Token: 0x0600150A RID: 5386 RVA: 0x00050DF4 File Offset: 0x0004EFF4
[ComVisible(false)]
public override DateTime MinSupportedDateTime
{
get
{
return ThaiBuddhistCalendar.ThaiMin;
}
}
/// <summary>Gets the latest date and time supported by the <see cref="T:System.Globalization.ThaiBuddhistCalendar" /> class.</summary>
/// <returns>The latest date and time supported by the <see cref="T:System.Globalization.ThaiBuddhistCalendar" /> class, which is equivalent to the last moment of December 31, 9999 C.E. in the Gregorian calendar.</returns>
// Token: 0x170003BD RID: 957
// (get) Token: 0x0600150B RID: 5387 RVA: 0x00050DFC File Offset: 0x0004EFFC
[ComVisible(false)]
public override DateTime MaxSupportedDateTime
{
get
{
return ThaiBuddhistCalendar.ThaiMax;
}
}
/// <summary>Represents the current era. This field is constant.</summary>
// Token: 0x040005F4 RID: 1524
public const int ThaiBuddhistEra = 1;
// Token: 0x040005F5 RID: 1525
internal static readonly CCGregorianEraHandler M_EraHandler = new CCGregorianEraHandler();
// Token: 0x040005F6 RID: 1526
private static DateTime ThaiMin = new DateTime(1, 1, 1, 0, 0, 0);
// Token: 0x040005F7 RID: 1527
private static DateTime ThaiMax = new DateTime(9999, 12, 31, 11, 59, 59);
}
}
@@ -0,0 +1,472 @@
using System;
using System.IO;
namespace System.Globalization
{
/// <summary>Represents the Saudi Hijri (Um Al Qura) calendar.</summary>
// Token: 0x0200019D RID: 413
[MonoTODO("Serialization format not compatible with .NET")]
[Serializable]
public class UmAlQuraCalendar : Calendar
{
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.UmAlQuraCalendar" /> class. </summary>
// Token: 0x0600150C RID: 5388 RVA: 0x00050E04 File Offset: 0x0004F004
public UmAlQuraCalendar()
{
this.M_AbbrEraNames = new string[] { "A.H." };
this.M_EraNames = new string[] { "Anno Hegirae" };
if (this.twoDigitYearMax == 99)
{
this.twoDigitYearMax = 1451;
}
}
/// <summary>Gets a list of the eras that are supported by the current <see cref="T:System.Globalization.UmAlQuraCalendar" />.</summary>
/// <returns>An array that consists of a single element having a value that is <see cref="F:System.Globalization.UmAlQuraCalendar.UmAlQuraEra" />.</returns>
// Token: 0x170003BE RID: 958
// (get) Token: 0x0600150E RID: 5390 RVA: 0x00050EB4 File Offset: 0x0004F0B4
public override int[] Eras
{
get
{
return new int[] { 1 };
}
}
/// <summary>Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.</summary>
/// <returns>The last year of a 100-year range that can be represented by a 2-digit year.</returns>
/// <exception cref="T:System.InvalidOperationException">This calendar is read-only.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">In a set operation, the Um Al Qura calendar year value is less than 1318 but not 99, or is greater than 1450.</exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.RegistryPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x170003BF RID: 959
// (get) Token: 0x0600150F RID: 5391 RVA: 0x00050EC0 File Offset: 0x0004F0C0
// (set) Token: 0x06001510 RID: 5392 RVA: 0x00050EC8 File Offset: 0x0004F0C8
public override int TwoDigitYearMax
{
get
{
return this.twoDigitYearMax;
}
set
{
base.CheckReadOnly();
base.M_ArgumentInRange("value", value, 100, this.M_MaxYear);
this.twoDigitYearMax = value;
}
}
// Token: 0x170003C0 RID: 960
// (get) Token: 0x06001511 RID: 5393 RVA: 0x00050EF8 File Offset: 0x0004F0F8
// (set) Token: 0x06001512 RID: 5394 RVA: 0x00050F00 File Offset: 0x0004F100
internal virtual int AddHijriDate
{
get
{
return this.M_AddHijriDate;
}
set
{
base.CheckReadOnly();
if (value < -3 && value > 3)
{
throw new ArgumentOutOfRangeException("AddHijriDate", "Value should be between -3 and 3.");
}
this.M_AddHijriDate = value;
}
}
// Token: 0x06001513 RID: 5395 RVA: 0x00050F3C File Offset: 0x0004F13C
internal void M_CheckFixedHijri(string param, int rdHijri)
{
if (rdHijri < UmAlQuraCalendar.M_MinFixed || rdHijri > UmAlQuraCalendar.M_MaxFixed - this.AddHijriDate)
{
StringWriter stringWriter = new StringWriter();
int num;
int num2;
int num3;
CCHijriCalendar.dmy_from_fixed(out num, out num2, out num3, UmAlQuraCalendar.M_MaxFixed - this.AddHijriDate);
if (this.AddHijriDate != 0)
{
stringWriter.Write("This HijriCalendar (AddHijriDate {0}) allows dates from 1. 1. 1 to {1}. {2}. {3}.", new object[] { this.AddHijriDate, num, num2, num3 });
}
else
{
stringWriter.Write("HijriCalendar allows dates from 1.1.1 to {0}.{1}.{2}.", num, num2, num3);
}
throw new ArgumentOutOfRangeException(param, stringWriter.ToString());
}
}
// Token: 0x06001514 RID: 5396 RVA: 0x00050FF8 File Offset: 0x0004F1F8
internal void M_CheckDateTime(DateTime time)
{
int num = CCFixed.FromDateTime(time) - this.AddHijriDate;
this.M_CheckFixedHijri("time", num);
}
// Token: 0x06001515 RID: 5397 RVA: 0x00051020 File Offset: 0x0004F220
internal int M_FromDateTime(DateTime time)
{
return CCFixed.FromDateTime(time) - this.AddHijriDate;
}
// Token: 0x06001516 RID: 5398 RVA: 0x00051030 File Offset: 0x0004F230
internal DateTime M_ToDateTime(int rd)
{
return CCFixed.ToDateTime(rd + this.AddHijriDate);
}
// Token: 0x06001517 RID: 5399 RVA: 0x00051040 File Offset: 0x0004F240
internal DateTime M_ToDateTime(int date, int hour, int minute, int second, int milliseconds)
{
return CCFixed.ToDateTime(date + this.AddHijriDate, hour, minute, second, (double)milliseconds);
}
// Token: 0x06001518 RID: 5400 RVA: 0x00051058 File Offset: 0x0004F258
internal void M_CheckEra(ref int era)
{
if (era == 0)
{
era = 1;
}
if (era != 1)
{
throw new ArgumentException("Era value was not valid.");
}
}
// Token: 0x06001519 RID: 5401 RVA: 0x00051078 File Offset: 0x0004F278
internal override void M_CheckYE(int year, ref int era)
{
this.M_CheckEra(ref era);
base.M_ArgumentInRange("year", year, 1, 9666);
}
// Token: 0x0600151A RID: 5402 RVA: 0x000510A0 File Offset: 0x0004F2A0
internal void M_CheckYME(int year, int month, ref int era)
{
this.M_CheckYE(year, ref era);
if (month < 1 || month > 12)
{
throw new ArgumentOutOfRangeException("month", "Month must be between one and twelve.");
}
if (year == 9666)
{
int num = CCHijriCalendar.fixed_from_dmy(1, month, year);
this.M_CheckFixedHijri("month", num);
}
}
// Token: 0x0600151B RID: 5403 RVA: 0x000510F4 File Offset: 0x0004F2F4
internal void M_CheckYMDE(int year, int month, int day, ref int era)
{
this.M_CheckYME(year, month, ref era);
base.M_ArgumentInRange("day", day, 1, this.GetDaysInMonth(year, month, 1));
if (year == 9666)
{
int num = CCHijriCalendar.fixed_from_dmy(day, month, year);
this.M_CheckFixedHijri("day", num);
}
}
/// <summary>Calculates a date that is a specified number of months away from a specified initial date.</summary>
/// <returns>A <see cref="T:System.DateTime" /> that represents the date yielded by adding the number of months specified by the <paramref name="months" /> parameter to the date specified by the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add months. The <see cref="T:System.Globalization.UmAlQuraCalendar" /> class supports only dates from 04/30/1900 00.00.00 (Gregorian date) through 05/13/2029 23:59:59 (Gregorian date).</param>
/// <param name="months">The positive or negative number of months to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting date is outside the range supported by the <see cref="T:System.Globalization.UmAlQuraCalendar" /> class. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="months" /> is less than -120,000 or greater than 120,000. -or-<paramref name="time" /> is outside the range supported by this calendar.</exception>
// Token: 0x0600151C RID: 5404 RVA: 0x00051144 File Offset: 0x0004F344
public override DateTime AddMonths(DateTime time, int months)
{
int num = this.M_FromDateTime(time);
int num2;
int num3;
int num4;
CCHijriCalendar.dmy_from_fixed(out num2, out num3, out num4, num);
num3 += months;
num4 += CCMath.div_mod(out num3, num3, 12);
num = CCHijriCalendar.fixed_from_dmy(num2, num3, num4);
this.M_CheckFixedHijri("time", num);
return this.M_ToDateTime(num).Add(time.TimeOfDay);
}
/// <summary>Calculates a date that is a specified number of years away from a specified initial date.</summary>
/// <returns>A <see cref="T:System.DateTime" /> that represents the date yielded by adding the number of years specified by the <paramref name="years" /> parameter to the date specified by the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to which to add years. The <see cref="T:System.Globalization.UmAlQuraCalendar" /> class supports only dates from 04/30/1900 00.00.00 (Gregorian date) through 05/13/2029 23:59:59 (Gregorian date).</param>
/// <param name="years">The positive or negative number of years to add. </param>
/// <exception cref="T:System.ArgumentException">The resulting date is outside the range supported by the <see cref="T:System.Globalization.UmAlQuraCalendar" /> class. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="years" /> is less than -10,000 or greater than 10,000. -or-<paramref name="time" /> is outside the range supported by this calendar.</exception>
// Token: 0x0600151D RID: 5405 RVA: 0x000511A4 File Offset: 0x0004F3A4
public override DateTime AddYears(DateTime time, int years)
{
int num = this.M_FromDateTime(time);
int num2;
int num3;
int num4;
CCHijriCalendar.dmy_from_fixed(out num2, out num3, out num4, num);
num4 += years;
num = CCHijriCalendar.fixed_from_dmy(num2, num3, num4);
this.M_CheckFixedHijri("time", num);
return this.M_ToDateTime(num).Add(time.TimeOfDay);
}
/// <summary>Calculates on which day of the month a specified date occurs.</summary>
/// <returns>An integer from 1 through 30 that represents the day of the month specified by the <paramref name="time" /> parameter. </returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. The <see cref="T:System.Globalization.UmAlQuraCalendar" /> class supports only dates from 04/30/1900 00.00.00 (Gregorian date) through 05/13/2029 23:59:59 (Gregorian date).</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="time" /> is outside the range supported by this calendar. </exception>
// Token: 0x0600151E RID: 5406 RVA: 0x000511F8 File Offset: 0x0004F3F8
public override int GetDayOfMonth(DateTime time)
{
int num = this.M_FromDateTime(time);
this.M_CheckFixedHijri("time", num);
return CCHijriCalendar.day_from_fixed(num);
}
/// <summary>Calculates on which day of the week a specified date occurs.</summary>
/// <returns>A <see cref="T:System.DayOfWeek" /> value that represents the day of the week specified by the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. The <see cref="T:System.Globalization.UmAlQuraCalendar" /> class supports only dates from 04/30/1900 00.00.00 (Gregorian date) through 05/13/2029 23:59:59 (Gregorian date).</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="time" /> is outside the range supported by this calendar. </exception>
// Token: 0x0600151F RID: 5407 RVA: 0x00051220 File Offset: 0x0004F420
public override DayOfWeek GetDayOfWeek(DateTime time)
{
int num = this.M_FromDateTime(time);
this.M_CheckFixedHijri("time", num);
return CCFixed.day_of_week(num);
}
/// <summary>Calculates on which day of the year a specified date occurs.</summary>
/// <returns>An integer from 1 through 355 that represents the day of the year specified by the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. The <see cref="T:System.Globalization.UmAlQuraCalendar" /> class supports only dates from 04/30/1900 00.00.00 (Gregorian date) through 05/13/2029 23:59:59 (Gregorian date).</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="time" /> is outside the range supported by this calendar. </exception>
// Token: 0x06001520 RID: 5408 RVA: 0x00051248 File Offset: 0x0004F448
public override int GetDayOfYear(DateTime time)
{
int num = this.M_FromDateTime(time);
this.M_CheckFixedHijri("time", num);
int num2 = CCHijriCalendar.year_from_fixed(num);
int num3 = CCHijriCalendar.fixed_from_dmy(1, 1, num2);
return num - num3 + 1;
}
/// <summary>Calculates the number of days in the specified month of the specified year and era.</summary>
/// <returns>The number of days in the specified month in the specified year and era. The return value is 29 in a common year and 30 in a leap year.</returns>
/// <param name="year">A year. </param>
/// <param name="month">An integer from 1 through 12 that represents a month. </param>
/// <param name="era">An era. Specify UmAlQuraCalendar.Eras[UmAlQuraCalendar.CurrentEra] or <see cref="F:System.Globalization.UmAlQuraCalendar.UmAlQuraEra" />.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" />, <paramref name="month" />, or <paramref name="era" /> is outside the range supported by the <see cref="T:System.Globalization.UmAlQuraCalendar" /> class. </exception>
// Token: 0x06001521 RID: 5409 RVA: 0x00051280 File Offset: 0x0004F480
public override int GetDaysInMonth(int year, int month, int era)
{
this.M_CheckYME(year, month, ref era);
int num = CCHijriCalendar.fixed_from_dmy(1, month, year);
int num2 = CCHijriCalendar.fixed_from_dmy(1, month + 1, year);
return num2 - num;
}
/// <summary>Calculates the number of days in the specified year of the specified era.</summary>
/// <returns>The number of days in the specified year and era. The number of days is 354 in a common year or 355 in a leap year.</returns>
/// <param name="year">A year. </param>
/// <param name="era">An era. Specify UmAlQuraCalendar.Eras[UmAlQuraCalendar.CurrentEra] or <see cref="F:System.Globalization.UmAlQuraCalendar.UmAlQuraEra" />.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> or <paramref name="era" /> is outside the range supported by the <see cref="T:System.Globalization.UmAlQuraCalendar" /> class. </exception>
// Token: 0x06001522 RID: 5410 RVA: 0x000512B0 File Offset: 0x0004F4B0
public override int GetDaysInYear(int year, int era)
{
this.M_CheckYE(year, ref era);
int num = CCHijriCalendar.fixed_from_dmy(1, 1, year);
int num2 = CCHijriCalendar.fixed_from_dmy(1, 1, year + 1);
return num2 - num;
}
/// <summary>Calculates in which era a specified date occurs.</summary>
/// <returns>Always returns the <see cref="F:System.Globalization.UmAlQuraCalendar.UmAlQuraEra" /> value.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. The <see cref="T:System.Globalization.UmAlQuraCalendar" /> class supports only dates from 04/30/1900 00.00.00 (Gregorian date) through 05/13/2029 23:59:59 (Gregorian date).</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="time" /> is outside the range supported by this calendar. </exception>
// Token: 0x06001523 RID: 5411 RVA: 0x000512E0 File Offset: 0x0004F4E0
public override int GetEra(DateTime time)
{
this.M_CheckDateTime(time);
return 1;
}
/// <summary>Calculates the leap month for a specified year and era.</summary>
/// <returns>Always 0 because the <see cref="T:System.Globalization.UmAlQuraCalendar" /> class does not support leap months.</returns>
/// <param name="year">A year.</param>
/// <param name="era">An era. Specify UmAlQuraCalendar.Eras[UmAlQuraCalendar.CurrentEra] or <see cref="F:System.Globalization.UmAlQuraCalendar.UmAlQuraEra" />.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is less than 1318 or greater than 1450.-or-<paramref name="era" /> is not UmAlQuraCalendar.Eras[UmAlQuraCalendar.CurrentEra] or <see cref="F:System.Globalization.UmAlQuraCalendar.UmAlQuraEra" />.</exception>
// Token: 0x06001524 RID: 5412 RVA: 0x000512EC File Offset: 0x0004F4EC
public override int GetLeapMonth(int year, int era)
{
return 0;
}
/// <summary>Calculates the month in which a specified date occurs.</summary>
/// <returns>An integer from 1 through 12 that represents the month in the date specified by the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. The <see cref="T:System.Globalization.UmAlQuraCalendar" /> class supports only dates from 04/30/1900 00.00.00 (Gregorian date) through 05/13/2029 23:59:59 (Gregorian date).</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="time" /> is outside the range supported by this calendar. </exception>
// Token: 0x06001525 RID: 5413 RVA: 0x000512F0 File Offset: 0x0004F4F0
public override int GetMonth(DateTime time)
{
int num = this.M_FromDateTime(time);
this.M_CheckFixedHijri("time", num);
return CCHijriCalendar.month_from_fixed(num);
}
/// <summary>Calculates the number of months in the specified year of the specified era.</summary>
/// <returns>The return value is always 12.</returns>
/// <param name="year">A year. </param>
/// <param name="era">An era. Specify UmAlQuaraCalendar.Eras[UmAlQuraCalendar.CurrentEra] or <see cref="F:System.Globalization.UmAlQuraCalendar.UmAlQuraEra" />.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by this calendar. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="era" /> is outside the range supported by this calendar. </exception>
// Token: 0x06001526 RID: 5414 RVA: 0x00051318 File Offset: 0x0004F518
public override int GetMonthsInYear(int year, int era)
{
this.M_CheckYE(year, ref era);
return 12;
}
/// <summary>Calculates the year of a date represented by a specified <see cref="T:System.DateTime" />.</summary>
/// <returns>An integer that represents the year specified by the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> to read. The <see cref="T:System.Globalization.UmAlQuraCalendar" /> class supports only dates from 04/30/1900 00.00.00 (Gregorian date) through 05/13/2029 23:59:59 (Gregorian date).</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="time" /> is outside the range supported by this calendar. </exception>
// Token: 0x06001527 RID: 5415 RVA: 0x00051328 File Offset: 0x0004F528
public override int GetYear(DateTime time)
{
int num = this.M_FromDateTime(time);
this.M_CheckFixedHijri("time", num);
return CCHijriCalendar.year_from_fixed(num);
}
/// <summary>Determines whether the specified date is a leap day.</summary>
/// <returns>true if the specified day is a leap day; otherwise, false. The return value is always false because the <see cref="T:System.Globalization.UmAlQuraCalendar" /> class does not support the notion of a leap day.</returns>
/// <param name="year">A year. </param>
/// <param name="month">An integer from 1 through 12 that represents a month. </param>
/// <param name="day">An integer from 1 through 30 that represents a day. </param>
/// <param name="era">An era. Specify UmAlQuraCalendar.Eras[UmAlQuraCalendar.CurrentEra] or <see cref="F:System.Globalization.UmAlQuraCalendar.UmAlQuraEra" />.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" />, <paramref name="month" />, <paramref name="day" />, or <paramref name="era" /> is outside the range supported by the <see cref="T:System.Globalization.UmAlQuraCalendar" /> class. </exception>
// Token: 0x06001528 RID: 5416 RVA: 0x00051350 File Offset: 0x0004F550
public override bool IsLeapDay(int year, int month, int day, int era)
{
this.M_CheckYMDE(year, month, day, ref era);
return this.IsLeapYear(year) && month == 12 && day == 30;
}
/// <summary>Determines whether the specified month in the specified year and era is a leap month.</summary>
/// <returns>Always false because the <see cref="T:System.Globalization.UmAlQuraCalendar" /> class does not support leap months.</returns>
/// <param name="year">A year. </param>
/// <param name="month">An integer from 1 through 12 that represents a month. </param>
/// <param name="era">An era. Specify UmAlQuraCalendar.Eras[UmAlQuraCalendar.CurrentEra] or <see cref="F:System.Globalization.UmAlQuraCalendar.UmAlQuraEra" />.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" />, <paramref name="month" />, or <paramref name="era" /> is outside the range supported by the <see cref="T:System.Globalization.UmAlQuraCalendar" /> class. </exception>
// Token: 0x06001529 RID: 5417 RVA: 0x0005137C File Offset: 0x0004F57C
public override bool IsLeapMonth(int year, int month, int era)
{
this.M_CheckYME(year, month, ref era);
return false;
}
/// <summary>Determines whether the specified year in the specified era is a leap year.</summary>
/// <returns>true if the specified year is a leap year; otherwise, false.</returns>
/// <param name="year">A year. </param>
/// <param name="era">An era. Specify UmAlQuraCalendar.Eras[UmAlQuraCalendar.CurrentEra] or <see cref="F:System.Globalization.UmAlQuraCalendar.UmAlQuraEra" />.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> or <paramref name="era" /> is outside the range supported by the <see cref="T:System.Globalization.UmAlQuraCalendar" /> class. </exception>
// Token: 0x0600152A RID: 5418 RVA: 0x0005138C File Offset: 0x0004F58C
public override bool IsLeapYear(int year, int era)
{
this.M_CheckYE(year, ref era);
return CCHijriCalendar.is_leap_year(year);
}
/// <summary>Returns a <see cref="T:System.DateTime" /> that is set to the specified date, time, and era.</summary>
/// <returns>The <see cref="T:System.DateTime" /> that is set to the specified date and time in the current era.</returns>
/// <param name="year">A year. </param>
/// <param name="month">An integer from 1 through 12 that represents a month. </param>
/// <param name="day">An integer from 1 through 29 that represents a day. </param>
/// <param name="hour">An integer from 0 through 23 that represents an hour. </param>
/// <param name="minute">An integer from 0 through 59 that represents a minute. </param>
/// <param name="second">An integer from 0 through 59 that represents a second. </param>
/// <param name="millisecond">An integer from 0 through 999 that represents a millisecond. </param>
/// <param name="era">An era. Specify UmAlQuraCalendar.Eras[UmAlQuraCalendar.CurrentEra] or <see cref="F:System.Globalization.UmAlQuraCalendar.UmAlQuraEra" />.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" />, <paramref name="month" />, <paramref name="day" />, or <paramref name="era" /> is outside the range supported by the <see cref="T:System.Globalization.UmAlQuraCalendar" /> class.-or- <paramref name="hour" /> is less than zero or greater than 23.-or- <paramref name="minute" /> is less than zero or greater than 59.-or- <paramref name="second" /> is less than zero or greater than 59.-or- <paramref name="millisecond" /> is less than zero or greater than 999. </exception>
// Token: 0x0600152B RID: 5419 RVA: 0x000513A0 File Offset: 0x0004F5A0
public override DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era)
{
this.M_CheckYMDE(year, month, day, ref era);
base.M_CheckHMSM(hour, minute, second, millisecond);
int num = CCHijriCalendar.fixed_from_dmy(day, month, year);
return this.M_ToDateTime(num, hour, minute, second, millisecond);
}
/// <summary>Converts the specified year to a four-digit year by using the <see cref="P:System.Globalization.UmAlQuraCalendar.TwoDigitYearMax" /> property to determine the appropriate century.</summary>
/// <returns>If the <paramref name="year" /> parameter is a 2-digit year, the return value is the corresponding 4-digit year. If the <paramref name="year" /> parameter is a 4-digit year, the return value is the unchanged <paramref name="year" /> parameter.</returns>
/// <param name="year">A 2-digit year from 0 through 99, or a 4-digit Um Al Qura calendar year from 1318 through 1450.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="year" /> is outside the range supported by this calendar. </exception>
// Token: 0x0600152C RID: 5420 RVA: 0x000513E0 File Offset: 0x0004F5E0
public override int ToFourDigitYear(int year)
{
return base.ToFourDigitYear(year);
}
/// <summary>Gets the earliest date and time supported by this calendar.</summary>
/// <returns>The earliest date and time supported by the <see cref="T:System.Globalization.UmAlQuraCalendar" /> class, which is equivalent to the first moment of April 30, 1900 C.E. in the Gregorian calendar.</returns>
// Token: 0x170003C1 RID: 961
// (get) Token: 0x0600152D RID: 5421 RVA: 0x000513EC File Offset: 0x0004F5EC
public override DateTime MinSupportedDateTime
{
get
{
return UmAlQuraCalendar.Min;
}
}
/// <summary>Gets the latest date and time supported by this calendar.</summary>
/// <returns>The latest date and time supported by the <see cref="T:System.Globalization.UmAlQuraCalendar" /> class, which is equivalent to the last moment of May 13, 2029 C.E. in the Gregorian calendar.</returns>
// Token: 0x170003C2 RID: 962
// (get) Token: 0x0600152E RID: 5422 RVA: 0x000513F4 File Offset: 0x0004F5F4
public override DateTime MaxSupportedDateTime
{
get
{
return UmAlQuraCalendar.Max;
}
}
/// <summary>Represents the current era. This field is constant.</summary>
// Token: 0x040005F8 RID: 1528
public const int UmAlQuraEra = 1;
// Token: 0x040005F9 RID: 1529
internal static readonly int M_MinFixed = CCHijriCalendar.fixed_from_dmy(1, 1, 1);
// Token: 0x040005FA RID: 1530
internal static readonly int M_MaxFixed = CCGregorianCalendar.fixed_from_dmy(31, 12, 9999);
// Token: 0x040005FB RID: 1531
internal int M_AddHijriDate;
// Token: 0x040005FC RID: 1532
private static DateTime Min = new DateTime(622, 7, 18, 0, 0, 0);
// Token: 0x040005FD RID: 1533
private static DateTime Max = new DateTime(9999, 12, 31, 11, 59, 59);
}
}
@@ -0,0 +1,103 @@
using System;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Defines the Unicode category of a character.</summary>
// Token: 0x0200019E RID: 414
[ComVisible(true)]
[Serializable]
public enum UnicodeCategory
{
/// <summary>Indicates that the character is an uppercase letter. Signified by the Unicode designation "Lu" (letter, uppercase). The value is 0.</summary>
// Token: 0x040005FF RID: 1535
UppercaseLetter,
/// <summary>Indicates that the character is a lowercase letter. Signified by the Unicode designation "Ll" (letter, lowercase). The value is 1.</summary>
// Token: 0x04000600 RID: 1536
LowercaseLetter,
/// <summary>Indicates that the character is a titlecase letter. Signified by the Unicode designation "Lt" (letter, titlecase). The value is 2.</summary>
// Token: 0x04000601 RID: 1537
TitlecaseLetter,
/// <summary>Indicates that the character is a modifier letter, which is free-standing spacing character that indicates modifications of a preceding letter. Signified by the Unicode designation "Lm" (letter, modifier). The value is 3.</summary>
// Token: 0x04000602 RID: 1538
ModifierLetter,
/// <summary>Indicates that the character is a letter that is not an uppercase letter, a lowercase letter, a titlecase letter, or a modifier letter. Signified by the Unicode designation "Lo" (letter, other). The value is 4.</summary>
// Token: 0x04000603 RID: 1539
OtherLetter,
/// <summary>Indicates that the character is a nonspacing character, which indicates modifications of a base character. Signified by the Unicode designation "Mn" (mark, nonspacing). The value is 5.</summary>
// Token: 0x04000604 RID: 1540
NonSpacingMark,
/// <summary>Indicates that the character is a spacing character, which indicates modifications of a base character and affects the width of the glyph for that base character. Signified by the Unicode designation "Mc" (mark, spacing combining). The value is 6.</summary>
// Token: 0x04000605 RID: 1541
SpacingCombiningMark,
/// <summary>Indicates that the character is an enclosing mark, which is a nonspacing combining character that surrounds all previous characters up to and including a base character. Signified by the Unicode designation "Me" (mark, enclosing). The value is 7.</summary>
// Token: 0x04000606 RID: 1542
EnclosingMark,
/// <summary>Indicates that the character is a decimal digit, that is, in the range 0 through 9. Signified by the Unicode designation "Nd" (number, decimal digit). The value is 8.</summary>
// Token: 0x04000607 RID: 1543
DecimalDigitNumber,
/// <summary>Indicates that the character is a number represented by a letter, instead of a decimal digit, for example, the Roman numeral for five, which is "V". The indicator is signified by the Unicode designation "Nl" (number, letter). The value is 9.</summary>
// Token: 0x04000608 RID: 1544
LetterNumber,
/// <summary>Indicates that the character is a number that is neither a decimal digit nor a letter number, for example, the fraction 1/2. The indicator is signified by the Unicode designation "No" (number, other). The value is 10.</summary>
// Token: 0x04000609 RID: 1545
OtherNumber,
/// <summary>Indicates that the character is a space character, which has no glyph but is not a control or format character. Signified by the Unicode designation "Zs" (separator, space). The value is 11.</summary>
// Token: 0x0400060A RID: 1546
SpaceSeparator,
/// <summary>Indicates that the character is used to separate lines of text. Signified by the Unicode designation "Zl" (separator, line). The value is 12.</summary>
// Token: 0x0400060B RID: 1547
LineSeparator,
/// <summary>Indicates that the character is used to separate paragraphs. Signified by the Unicode designation "Zp" (separator, paragraph). The value is 13.</summary>
// Token: 0x0400060C RID: 1548
ParagraphSeparator,
/// <summary>Indicates that the character is a control code, with a Unicode value of U+007F or in the range U+0000 through U+001F or U+0080 through U+009F. Signified by the Unicode designation "Cc" (other, control). The value is 14.</summary>
// Token: 0x0400060D RID: 1549
Control,
/// <summary>Indicates that the character is a format character, which is not normally rendered but affects the layout of text or the operation of text processes. Signified by the Unicode designation "Cf" (other, format). The value is 15.</summary>
// Token: 0x0400060E RID: 1550
Format,
/// <summary>Indicates that the character is a high surrogate or a low surrogate. Surrogate code values are in the range U+D800 through U+DFFF. Signified by the Unicode designation "Cs" (other, surrogate). The value is 16.</summary>
// Token: 0x0400060F RID: 1551
Surrogate,
/// <summary>Indicates that the character is a private-use character, with a Unicode value in the range U+E000 through U+F8FF. Signified by the Unicode designation "Co" (other, private use). The value is 17.</summary>
// Token: 0x04000610 RID: 1552
PrivateUse,
/// <summary>Indicates that the character is a connector punctuation, which connects two characters. Signified by the Unicode designation "Pc" (punctuation, connector). The value is 18.</summary>
// Token: 0x04000611 RID: 1553
ConnectorPunctuation,
/// <summary>Indicates that the character is a dash or a hyphen. Signified by the Unicode designation "Pd" (punctuation, dash). The value is 19.</summary>
// Token: 0x04000612 RID: 1554
DashPunctuation,
/// <summary>Indicates that the character is the opening character of one of the paired punctuation marks, such as parentheses, square brackets, and braces. Signified by the Unicode designation "Ps" (punctuation, open). The value is 20.</summary>
// Token: 0x04000613 RID: 1555
OpenPunctuation,
/// <summary>Indicates that the character is the closing character of one of the paired punctuation marks, such as parentheses, square brackets, and braces. Signified by the Unicode designation "Pe" (punctuation, close). The value is 21.</summary>
// Token: 0x04000614 RID: 1556
ClosePunctuation,
/// <summary>Indicates that the character is an opening or initial quotation mark. Signified by the Unicode designation "Pi" (punctuation, initial quote). The value is 22.</summary>
// Token: 0x04000615 RID: 1557
InitialQuotePunctuation,
/// <summary>Indicates that the character is a closing or final quotation mark. Signified by the Unicode designation "Pf" (punctuation, final quote). The value is 23.</summary>
// Token: 0x04000616 RID: 1558
FinalQuotePunctuation,
/// <summary>Indicates that the character is a punctuation that is not a connector punctuation, a dash punctuation, an open punctuation, a close punctuation, an initial quote punctuation, or a final quote punctuation. Signified by the Unicode designation "Po" (punctuation, other). The value is 24.</summary>
// Token: 0x04000617 RID: 1559
OtherPunctuation,
/// <summary>Indicates that the character is a mathematical symbol, such as "+" or "= ". Signified by the Unicode designation "Sm" (symbol, math). The value is 25.</summary>
// Token: 0x04000618 RID: 1560
MathSymbol,
/// <summary>Indicates that the character is a currency symbol. Signified by the Unicode designation "Sc" (symbol, currency). The value is 26.</summary>
// Token: 0x04000619 RID: 1561
CurrencySymbol,
/// <summary>Indicates that the character is a modifier symbol, which indicates modifications of surrounding characters. For example, the fraction slash indicates that the number to the left is the numerator and the number to the right is the denominator. The indicator is signified by the Unicode designation "Sk" (symbol, modifier). The value is 27.</summary>
// Token: 0x0400061A RID: 1562
ModifierSymbol,
/// <summary>Indicates that the character is a symbol that is not a mathematical symbol, a currency symbol or a modifier symbol. Signified by the Unicode designation "So" (symbol, other). The value is 28.</summary>
// Token: 0x0400061B RID: 1563
OtherSymbol,
/// <summary>Indicates that the character is not assigned to any Unicode category. Signified by the Unicode designation "Cn" (other, not assigned). The value is 29.</summary>
// Token: 0x0400061C RID: 1564
OtherNotAssigned
}
}