terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
UmAlQuraCalendar.cs
Go to the documentation of this file.
1using System;
3
5{
6 // Token: 0x020005B4 RID: 1460
9 {
10 // Token: 0x06002C6E RID: 11374 RVA: 0x00062044 File Offset: 0x00060244
12 {
13 }
14
15 // Token: 0x170006A8 RID: 1704
16 // (get) Token: 0x06002C6F RID: 11375 RVA: 0x0006205C File Offset: 0x0006025C
18 {
19 get
20 {
21 if (!true)
22 {
23 }
24 return 1;
25 }
26 }
27
28 // Token: 0x170006A9 RID: 1705
29 // (get) Token: 0x06002C70 RID: 11376 RVA: 0x00062070 File Offset: 0x00060270
31 {
32 get
33 {
34 if (!true)
35 {
36 }
37 return 1;
38 }
39 }
40
41 // Token: 0x06002C71 RID: 11377 RVA: 0x00062084 File Offset: 0x00060284
43 {
44 }
45
46 // Token: 0x170006AA RID: 1706
47 // (get) Token: 0x06002C72 RID: 11378 RVA: 0x00062098 File Offset: 0x00060298
48 internal override int BaseCalendarID
49 {
50 get
51 {
52 return 6;
53 }
54 }
55
56 // Token: 0x170006AB RID: 1707
57 // (get) Token: 0x06002C73 RID: 11379 RVA: 0x000620A8 File Offset: 0x000602A8
58 internal override int ID
59 {
60 get
61 {
62 return 23;
63 }
64 }
65
66 // Token: 0x06002C74 RID: 11380 RVA: 0x000620B8 File Offset: 0x000602B8
67 private static void ConvertHijriToGregorian(int HijriYear, int HijriMonth, int HijriDay, int yg, int mg, int dg)
68 {
69 if (!true)
70 {
71 }
72 DateTime dateTime;
73 int year = dateTime.Year;
74 yg.m_value = year;
75 int num;
76 mg.m_value = num;
77 int num2;
79 }
80
81 // Token: 0x06002C75 RID: 11381 RVA: 0x000620E8 File Offset: 0x000602E8
82 private static long GetAbsoluteDateUmAlQura(int year, int month, int day)
83 {
84 if (!true)
85 {
86 }
87 if (!true)
88 {
89 }
90 return GregorianCalendar.GetAbsoluteDate(0, month, year);
91 }
92
93 // Token: 0x06002C76 RID: 11382 RVA: 0x00062104 File Offset: 0x00060304
94 internal static void CheckTicksRange(long ticks)
95 {
96 int num = 1;
97 if (num == 0)
98 {
99 }
100 if (num == 0)
101 {
102 }
103 }
104
105 // Token: 0x06002C77 RID: 11383 RVA: 0x0006212C File Offset: 0x0006032C
106 internal static void CheckEraRange(int era)
107 {
108 }
109
110 // Token: 0x06002C78 RID: 11384 RVA: 0x00062144 File Offset: 0x00060344
111 internal static void CheckYearRange(int year, int era)
112 {
113 if (!true)
114 {
115 }
117 }
118
119 // Token: 0x06002C79 RID: 11385 RVA: 0x0006216C File Offset: 0x0006036C
120 internal static void CheckYearMonthRange(int year, int month, int era)
121 {
122 if (!true)
123 {
124 }
126 }
127
128 // Token: 0x06002C7A RID: 11386 RVA: 0x00062190 File Offset: 0x00060390
129 private static void ConvertGregorianToHijri(DateTime time, int HijriYear, int HijriMonth, int HijriDay)
130 {
131 long num = 33251L;
132 if (num == 0L)
133 {
134 }
136 double totalDays = timeSpan.TotalDays;
137 int num2 = 1;
138 HijriDay.m_value = (int)num;
140 long num3;
141 HijriYear.m_value = (int)num3;
142 }
143
144 // Token: 0x06002C7B RID: 11387 RVA: 0x000621C8 File Offset: 0x000603C8
145 internal virtual int GetDatePart(DateTime time, int part)
146 {
147 /*
148An exception occurred when decompiling this method (06002C7B)
149
150ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 System.Globalization.UmAlQuraCalendar::GetDatePart(System.DateTime,System.Int32)
151
152 ---> System.Exception: Basic block has to end with unconditional control flow.
153{
154 IL_0009:
155 stloc:int64(var_1_15, call:int64(UmAlQuraCalendar::GetAbsoluteDateUmAlQura, ldloc:int32(part), ldloc:int64[exp:int32](var_0), ldc.i4:int32(-1073741824)))
156 stloc:int32(var_2_17, ldc.i4:int32(1))
157 stloc:int32(var_3_19, ldc.i4:int32(1))
158 stloc:int64(var_4_22, call:int64(UmAlQuraCalendar::GetAbsoluteDateUmAlQura, ldloc:int32(part), ldloc:int32(var_2_17), ldloc:int32(var_3_19)))
159 stloc:string(var_5_2E, call:string(Environment::GetResourceString, ldstr:string("Internal Error in DateTime and Calendar operations.")))
160}
161
162 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
163 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
164 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
165 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
166 --- End of inner exception stack trace ---
167 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
168 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
169*/;
170 }
171
172 // Token: 0x06002C7C RID: 11388 RVA: 0x0000207A File Offset: 0x0000027A
173 public override int GetDayOfMonth(DateTime time)
174 {
175 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
176 }
177
178 // Token: 0x06002C7D RID: 11389 RVA: 0x0000207A File Offset: 0x0000027A
179 public override DayOfWeek GetDayOfWeek(DateTime time)
180 {
181 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
182 }
183
184 // Token: 0x06002C7E RID: 11390 RVA: 0x00062204 File Offset: 0x00060404
185 public override int GetDaysInMonth(int year, int month, int era)
186 {
187 if (!true)
188 {
189 }
190 UmAlQuraCalendar.CheckYearMonthRange(year, month, era);
191 return year;
192 }
193
194 // Token: 0x06002C7F RID: 11391 RVA: 0x00062220 File Offset: 0x00060420
195 internal static int RealGetDaysInYear(int year)
196 {
197 }
198
199 // Token: 0x06002C80 RID: 11392 RVA: 0x00062230 File Offset: 0x00060430
200 public override int GetDaysInYear(int year, int era)
201 {
202 if (!true)
203 {
204 }
207 }
208
209 // Token: 0x06002C81 RID: 11393 RVA: 0x00062250 File Offset: 0x00060450
210 public override int GetEra(DateTime time)
211 {
212 long num;
214 return 1;
215 }
216
217 // Token: 0x170006AC RID: 1708
218 // (get) Token: 0x06002C82 RID: 11394 RVA: 0x0000207A File Offset: 0x0000027A
219 public override int[] Eras
220 {
221 get
222 {
223 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
224 }
225 }
226
227 // Token: 0x06002C83 RID: 11395 RVA: 0x0000207A File Offset: 0x0000027A
228 public override int GetMonth(DateTime time)
229 {
230 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
231 }
232
233 // Token: 0x06002C84 RID: 11396 RVA: 0x00062264 File Offset: 0x00060464
234 public override int GetMonthsInYear(int year, int era)
235 {
236 if (!true)
237 {
238 }
240 return 12;
241 }
242
243 // Token: 0x06002C85 RID: 11397 RVA: 0x0000207A File Offset: 0x0000027A
244 public override int GetYear(DateTime time)
245 {
246 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
247 }
248
249 // Token: 0x06002C86 RID: 11398 RVA: 0x00062280 File Offset: 0x00060480
250 public override bool IsLeapYear(int year, int era)
251 {
252 /*
253An exception occurred when decompiling this method (06002C86)
254
255ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean System.Globalization.UmAlQuraCalendar::IsLeapYear(System.Int32,System.Int32)
256
257 ---> System.Exception: Basic block has to end with unconditional control flow.
258{
259 IL_0003:
260 call:void(UmAlQuraCalendar::CheckYearRange, ldloc:int32(year), ldloc:int32(era))
261 stloc:int32(var_0_10, call:int32(UmAlQuraCalendar::RealGetDaysInYear, ldloc:int32(year)))
262}
263
264 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
265 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
266 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
267 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
268 --- End of inner exception stack trace ---
269 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
270 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
271*/;
272 }
273
274 // Token: 0x06002C87 RID: 11399 RVA: 0x000622A0 File Offset: 0x000604A0
275 public override DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era)
276 {
277 /*
278An exception occurred when decompiling this method (06002C87)
279
280ICSharpCode.Decompiler.DecompilerException: Error decompiling System.DateTime System.Globalization.UmAlQuraCalendar::ToDateTime(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)
281
282 ---> System.Exception: Basic block has to end with unconditional control flow.
283{
284 Block_0:
285 stloc:CultureInfo(var_1_07, callgetter:CultureInfo(CultureInfo::get_CurrentCulture))
286 stloc:string(var_2_12, call:string(Environment::GetResourceString, ldstr:string("Day must be between 1 and {0} for month {1}.")))
287 stloc:string(var_7_24, call:string(Environment::GetResourceString, ldstr:string("Year, Month, and Day parameters describe an un-representable DateTime.")))
288}
289
290 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
291 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
292 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
293 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
294 --- End of inner exception stack trace ---
295 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
296 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
297*/;
298 }
299
300 // Token: 0x170006AD RID: 1709
301 // (get) Token: 0x06002C88 RID: 11400 RVA: 0x000622D4 File Offset: 0x000604D4
302 // (set) Token: 0x06002C89 RID: 11401 RVA: 0x000622F0 File Offset: 0x000604F0
303 public override int TwoDigitYearMax
304 {
305 get
306 {
308 int num;
310 return num;
311 }
312 set
313 {
314 base.VerifyWritable();
316 }
317 }
318
319 // Token: 0x06002C8A RID: 11402 RVA: 0x0006231C File Offset: 0x0006051C
320 public override int ToFourDigitYear(int year)
321 {
322 return base.ToFourDigitYear(year);
323 }
324
325 // Token: 0x06002C8B RID: 11403 RVA: 0x00062350 File Offset: 0x00060550
326 // Note: this type is marked as 'beforefieldinit'.
331
332 // Token: 0x040018B4 RID: 6324
334
335 // Token: 0x040018B5 RID: 6325
336 internal static DateTime minDate;
337
338 // Token: 0x040018B6 RID: 6326
339 internal static DateTime maxDate;
340
341 // Token: 0x020005B5 RID: 1461
342 internal struct DateMapping
343 {
344 // Token: 0x06002C8C RID: 11404 RVA: 0x00062394 File Offset: 0x00060594
345 internal DateMapping(int MonthsLengthFlags, int GYear, int GMonth, int GDay)
346 {
348 }
349
350 // Token: 0x040018B7 RID: 6327
352
353 // Token: 0x040018B8 RID: 6328
355 }
356 }
357}
class f__AnonymousType0<< Count > j__TPar
static long GetAbsoluteDate(int year, int month, int day)
static void CheckYearRange(int year, int era)
static void CheckYearMonthRange(int year, int month, int era)
override DayOfWeek GetDayOfWeek(DateTime time)
override int GetMonth(DateTime time)
static void ConvertHijriToGregorian(int HijriYear, int HijriMonth, int HijriDay, int yg, int mg, int dg)
static UmAlQuraCalendar.DateMapping[] InitDateMapping()
static long GetAbsoluteDateUmAlQura(int year, int month, int day)
static readonly UmAlQuraCalendar.DateMapping[] HijriYearInfo
override int GetYear(DateTime time)
override int GetMonthsInYear(int year, int era)
override int GetEra(DateTime time)
override int GetDaysInMonth(int year, int month, int era)
override int GetDayOfMonth(DateTime time)
override bool IsLeapYear(int year, int era)
virtual int GetDatePart(DateTime time, int part)
override DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era)
static void ConvertGregorianToHijri(DateTime time, int HijriYear, int HijriMonth, int HijriDay)
static void CheckTicksRange(long ticks)
override int GetDaysInYear(int year, int era)
DayOfWeek
Definition DayOfWeek.cs:7
DateMapping(int MonthsLengthFlags, int GYear, int GMonth, int GDay)
double TotalDays
Definition TimeSpan.cs:97