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
Calendar.cs
Go to the documentation of this file.
1using System;
5
7{
8 // Token: 0x020005A8 RID: 1448
9 [ComVisible(true)]
11 public abstract class Calendar : ICloneable
12 {
13 // Token: 0x17000664 RID: 1636
14 // (get) Token: 0x06002B6C RID: 11116 RVA: 0x0005F9A8 File Offset: 0x0005DBA8
15 [ComVisible(false)]
17 {
18 get
19 {
20 if (!true)
21 {
22 }
23 return 1;
24 }
25 }
26
27 // Token: 0x17000665 RID: 1637
28 // (get) Token: 0x06002B6D RID: 11117 RVA: 0x0005F9BC File Offset: 0x0005DBBC
29 [ComVisible(false)]
31 {
32 get
33 {
34 if (!true)
35 {
36 }
37 return 1;
38 }
39 }
40
41 // Token: 0x06002B6E RID: 11118 RVA: 0x0005F9D0 File Offset: 0x0005DBD0
42 protected Calendar()
43 {
44 }
45
46 // Token: 0x17000666 RID: 1638
47 // (get) Token: 0x06002B6F RID: 11119 RVA: 0x0000207A File Offset: 0x0000027A
48 internal virtual int ID
49 {
50 get
51 {
52 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
53 }
54 }
55
56 // Token: 0x17000667 RID: 1639
57 // (get) Token: 0x06002B70 RID: 11120 RVA: 0x0000207A File Offset: 0x0000027A
58 internal virtual int BaseCalendarID
59 {
60 get
61 {
62 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
63 }
64 }
65
66 // Token: 0x17000668 RID: 1640
67 // (get) Token: 0x06002B71 RID: 11121 RVA: 0x0005F9E4 File Offset: 0x0005DBE4
68 [ComVisible(false)]
69 public bool IsReadOnly
70 {
71 get
72 {
73 return this.m_isReadOnly;
74 }
75 }
76
77 // Token: 0x06002B72 RID: 11122 RVA: 0x0005F9F8 File Offset: 0x0005DBF8
78 [ComVisible(false)]
79 public virtual object Clone()
80 {
81 object obj = base.MemberwiseClone();
82 if (obj != null)
83 {
84 }
85 return obj;
86 }
87
88 // Token: 0x06002B73 RID: 11123 RVA: 0x0005FA18 File Offset: 0x0005DC18
89 [ComVisible(false)]
90 public static Calendar ReadOnly(Calendar calendar)
91 {
92 if (!true)
93 {
94 object obj;
95 if (obj != null)
96 {
97 }
98 }
99 throw new InvalidCastException();
100 }
101
102 // Token: 0x06002B74 RID: 11124 RVA: 0x0005FA34 File Offset: 0x0005DC34
103 internal void VerifyWritable()
104 {
105 /*
106An exception occurred when decompiling this method (06002B74)
107
108ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void System.Globalization.Calendar::VerifyWritable()
109
110 ---> System.Exception: Basic block has to end with unconditional control flow.
111{
112 IL_0009:
113 stloc:string(var_0_13, call:string(Environment::GetResourceString, ldstr:string("Instance is read-only.")))
114}
115
116 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
117 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
118 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
119 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
120 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
121 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
122 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
123 --- End of inner exception stack trace ---
124 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
125 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
126*/;
127 }
128
129 // Token: 0x06002B75 RID: 11125 RVA: 0x0005FA54 File Offset: 0x0005DC54
130 internal void SetReadOnlyState(bool readOnly)
131 {
132 }
133
134 // Token: 0x17000669 RID: 1641
135 // (get) Token: 0x06002B76 RID: 11126 RVA: 0x0005FA64 File Offset: 0x0005DC64
136 internal virtual int CurrentEraValue
137 {
138 get
139 {
142 int iCurrentEra = calendarData.iCurrentEra;
143 this.m_currentEraValue = iCurrentEra;
144 return iCurrentEra;
145 }
146 }
147
148 // Token: 0x06002B77 RID: 11127
149 public abstract int GetDayOfMonth(DateTime time);
150
151 // Token: 0x06002B78 RID: 11128
152 public abstract DayOfWeek GetDayOfWeek(DateTime time);
153
154 // Token: 0x06002B79 RID: 11129
155 public abstract int GetDaysInMonth(int year, int month, int era);
156
157 // Token: 0x06002B7A RID: 11130
158 public abstract int GetDaysInYear(int year, int era);
159
160 // Token: 0x06002B7B RID: 11131
161 public abstract int GetEra(DateTime time);
162
163 // Token: 0x1700066A RID: 1642
164 // (get) Token: 0x06002B7C RID: 11132
165 public abstract int[] Eras { get; }
166
167 // Token: 0x06002B7D RID: 11133
168 public abstract int GetMonth(DateTime time);
169
170 // Token: 0x06002B7E RID: 11134
171 public abstract int GetMonthsInYear(int year, int era);
172
173 // Token: 0x06002B7F RID: 11135
174 public abstract int GetYear(DateTime time);
175
176 // Token: 0x06002B80 RID: 11136 RVA: 0x0000207A File Offset: 0x0000027A
177 public virtual bool IsLeapYear(int year)
178 {
179 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
180 }
181
182 // Token: 0x06002B81 RID: 11137
183 public abstract bool IsLeapYear(int year, int era);
184
185 // Token: 0x06002B82 RID: 11138 RVA: 0x0000207A File Offset: 0x0000027A
186 public virtual DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond)
187 {
188 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
189 }
190
191 // Token: 0x06002B83 RID: 11139
192 public abstract DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era);
193
194 // Token: 0x06002B84 RID: 11140 RVA: 0x0005FA88 File Offset: 0x0005DC88
195 internal virtual bool TryToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era, [Out] DateTime result)
196 {
197 if (!true)
198 {
199 return;
200 }
201 }
202
203 // Token: 0x06002B85 RID: 11141 RVA: 0x0005FAA0 File Offset: 0x0005DCA0
204 internal virtual bool IsValidYear(int year, int era)
205 {
206 }
207
208 // Token: 0x06002B86 RID: 11142 RVA: 0x0000207A File Offset: 0x0000027A
209 internal virtual bool IsValidMonth(int year, int month, int era)
210 {
211 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
212 }
213
214 // Token: 0x06002B87 RID: 11143 RVA: 0x0000207A File Offset: 0x0000027A
215 internal virtual bool IsValidDay(int year, int month, int day, int era)
216 {
217 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
218 }
219
220 // Token: 0x1700066B RID: 1643
221 // (get) Token: 0x06002B88 RID: 11144 RVA: 0x0005FAB0 File Offset: 0x0005DCB0
222 // (set) Token: 0x06002B89 RID: 11145 RVA: 0x0005FAC4 File Offset: 0x0005DCC4
223 public virtual int TwoDigitYearMax
224 {
225 get
226 {
227 return this.twoDigitYearMax;
228 }
229 set
230 {
231 this.VerifyWritable();
233 }
234 }
235
236 // Token: 0x06002B8A RID: 11146 RVA: 0x0005FAE0 File Offset: 0x0005DCE0
237 public virtual int ToFourDigitYear(int year)
238 {
239 return year;
240 }
241
242 // Token: 0x06002B8B RID: 11147 RVA: 0x0005FB00 File Offset: 0x0005DD00
243 internal static long TimeToTicks(int hour, int minute, int second, int millisecond)
244 {
245 return TimeSpan.TimeToTicks(42187672, hour, minute);
246 }
247
248 // Token: 0x06002B8C RID: 11148 RVA: 0x0005FB38 File Offset: 0x0005DD38
250 {
251 if (!true)
252 {
253 }
254 return CalID;
255 }
256
257 // Token: 0x04001819 RID: 6169
258 internal const long TicksPerMillisecond = 10000L;
259
260 // Token: 0x0400181A RID: 6170
261 internal const long TicksPerSecond = 10000000L;
262
263 // Token: 0x0400181B RID: 6171
264 internal const long TicksPerMinute = 600000000L;
265
266 // Token: 0x0400181C RID: 6172
267 internal const long TicksPerHour = 36000000000L;
268
269 // Token: 0x0400181D RID: 6173
270 internal const long TicksPerDay = 864000000000L;
271
272 // Token: 0x0400181E RID: 6174
273 internal const int MillisPerSecond = 1000;
274
275 // Token: 0x0400181F RID: 6175
276 internal const int MillisPerMinute = 60000;
277
278 // Token: 0x04001820 RID: 6176
279 internal const int MillisPerHour = 3600000;
280
281 // Token: 0x04001821 RID: 6177
282 internal const int MillisPerDay = 86400000;
283
284 // Token: 0x04001822 RID: 6178
285 internal const int DaysPerYear = 365;
286
287 // Token: 0x04001823 RID: 6179
288 internal const int DaysPer4Years = 1461;
289
290 // Token: 0x04001824 RID: 6180
291 internal const int DaysPer100Years = 36524;
292
293 // Token: 0x04001825 RID: 6181
294 internal const int DaysPer400Years = 146097;
295
296 // Token: 0x04001826 RID: 6182
297 internal const int DaysTo10000 = 3652059;
298
299 // Token: 0x04001827 RID: 6183
300 internal const long MaxMillis = 315537897600000L;
301
302 // Token: 0x04001828 RID: 6184
303 internal const int CAL_GREGORIAN = 1;
304
305 // Token: 0x04001829 RID: 6185
306 internal const int CAL_GREGORIAN_US = 2;
307
308 // Token: 0x0400182A RID: 6186
309 internal const int CAL_JAPAN = 3;
310
311 // Token: 0x0400182B RID: 6187
312 internal const int CAL_TAIWAN = 4;
313
314 // Token: 0x0400182C RID: 6188
315 internal const int CAL_KOREA = 5;
316
317 // Token: 0x0400182D RID: 6189
318 internal const int CAL_HIJRI = 6;
319
320 // Token: 0x0400182E RID: 6190
321 internal const int CAL_THAI = 7;
322
323 // Token: 0x0400182F RID: 6191
324 internal const int CAL_HEBREW = 8;
325
326 // Token: 0x04001830 RID: 6192
327 internal const int CAL_GREGORIAN_ME_FRENCH = 9;
328
329 // Token: 0x04001831 RID: 6193
330 internal const int CAL_GREGORIAN_ARABIC = 10;
331
332 // Token: 0x04001832 RID: 6194
333 internal const int CAL_GREGORIAN_XLIT_ENGLISH = 11;
334
335 // Token: 0x04001833 RID: 6195
336 internal const int CAL_GREGORIAN_XLIT_FRENCH = 12;
337
338 // Token: 0x04001834 RID: 6196
339 internal const int CAL_JULIAN = 13;
340
341 // Token: 0x04001835 RID: 6197
342 internal const int CAL_JAPANESELUNISOLAR = 14;
343
344 // Token: 0x04001836 RID: 6198
345 internal const int CAL_CHINESELUNISOLAR = 15;
346
347 // Token: 0x04001837 RID: 6199
348 internal const int CAL_SAKA = 16;
349
350 // Token: 0x04001838 RID: 6200
351 internal const int CAL_LUNAR_ETO_CHN = 17;
352
353 // Token: 0x04001839 RID: 6201
354 internal const int CAL_LUNAR_ETO_KOR = 18;
355
356 // Token: 0x0400183A RID: 6202
357 internal const int CAL_LUNAR_ETO_ROKUYOU = 19;
358
359 // Token: 0x0400183B RID: 6203
360 internal const int CAL_KOREANLUNISOLAR = 20;
361
362 // Token: 0x0400183C RID: 6204
363 internal const int CAL_TAIWANLUNISOLAR = 21;
364
365 // Token: 0x0400183D RID: 6205
366 internal const int CAL_PERSIAN = 22;
367
368 // Token: 0x0400183E RID: 6206
369 internal const int CAL_UMALQURA = 23;
370
371 // Token: 0x0400183F RID: 6207
372 internal int m_currentEraValue;
373
374 // Token: 0x04001840 RID: 6208
375 [OptionalField(VersionAdded = 2)]
376 private bool m_isReadOnly;
377
378 // Token: 0x04001841 RID: 6209
379 public const int CurrentEra = 0;
380
381 // Token: 0x04001842 RID: 6210
382 internal int twoDigitYearMax;
383 }
384}
class f__AnonymousType0<< Count > j__TPar
virtual bool TryToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era, [Out] DateTime result)
Definition Calendar.cs:195
virtual object Clone()
Definition Calendar.cs:79
static Calendar ReadOnly(Calendar calendar)
Definition Calendar.cs:90
virtual DateTime MaxSupportedDateTime
Definition Calendar.cs:31
virtual int ToFourDigitYear(int year)
Definition Calendar.cs:237
virtual bool IsValidYear(int year, int era)
Definition Calendar.cs:204
virtual bool IsLeapYear(int year)
Definition Calendar.cs:177
static int GetSystemTwoDigitYearSetting(int CalID, int defaultYearValue)
Definition Calendar.cs:249
static long TimeToTicks(int hour, int minute, int second, int millisecond)
Definition Calendar.cs:243
virtual bool IsValidMonth(int year, int month, int era)
Definition Calendar.cs:209
int GetDaysInMonth(int year, int month, int era)
virtual bool IsValidDay(int year, int month, int day, int era)
Definition Calendar.cs:215
DayOfWeek GetDayOfWeek(DateTime time)
virtual DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond)
Definition Calendar.cs:186
int GetYear(DateTime time)
virtual DateTime MinSupportedDateTime
Definition Calendar.cs:17
int GetDayOfMonth(DateTime time)
int GetDaysInYear(int year, int era)
int GetMonth(DateTime time)
void SetReadOnlyState(bool readOnly)
Definition Calendar.cs:130
int GetMonthsInYear(int year, int era)
int GetEra(DateTime time)
DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era)
bool IsLeapYear(int year, int era)
DayOfWeek
Definition DayOfWeek.cs:7
static long TimeToTicks(int hour, int minute, int second)
Definition TimeSpan.cs:307