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
DateTimeFormat.cs
Go to the documentation of this file.
1using System;
4using System.Text;
5
6namespace System
7{
8 // Token: 0x020000AC RID: 172
9 internal static class DateTimeFormat
10 {
11 // Token: 0x0600068F RID: 1679 RVA: 0x0000FBE4 File Offset: 0x0000DDE4
12 internal static void FormatDigits(StringBuilder outputBuffer, int value, int len)
13 {
14 if (!true)
15 {
16 }
17 long num = 0L;
19 }
20
21 // Token: 0x06000690 RID: 1680 RVA: 0x0000FC00 File Offset: 0x0000DE00
22 internal static void FormatDigits(StringBuilder outputBuffer, int value, int len, bool overrideLengthLimit)
23 {
24 }
25
26 // Token: 0x06000691 RID: 1681 RVA: 0x0000FC14 File Offset: 0x0000DE14
27 private static void HebrewFormatDigits(StringBuilder outputBuffer, int digits)
28 {
29 if (!true)
30 {
31 }
32 string text = HebrewNumber.ToString(digits);
33 StringBuilder stringBuilder = outputBuffer.Append(text);
34 }
35
36 // Token: 0x06000692 RID: 1682 RVA: 0x0000FC34 File Offset: 0x0000DE34
37 internal static int ParseRepeatPattern(ReadOnlySpan<char> format, int pos, char patternChar)
38 {
39 return 1;
40 }
41
42 // Token: 0x06000693 RID: 1683 RVA: 0x0000FC44 File Offset: 0x0000DE44
43 private static string FormatDayOfWeek(int dayOfWeek, int repeat, DateTimeFormatInfo dtfi)
44 {
45 string text;
46 return text;
47 }
48
49 // Token: 0x06000694 RID: 1684 RVA: 0x0000FC54 File Offset: 0x0000DE54
50 private static string FormatMonth(int month, int repeatCount, DateTimeFormatInfo dtfi)
51 {
52 string text;
53 return text;
54 }
55
56 // Token: 0x06000695 RID: 1685 RVA: 0x0000FC64 File Offset: 0x0000DE64
57 private static string FormatHebrewMonthName(DateTime time, int month, int repeatCount, DateTimeFormatInfo dtfi)
58 {
59 string text;
60 return text;
61 }
62
63 // Token: 0x06000696 RID: 1686 RVA: 0x0000FC78 File Offset: 0x0000DE78
64 internal static int ParseQuoteString(ReadOnlySpan<char> format, int pos, StringBuilder result)
65 {
66 /*
67An exception occurred when decompiling this method (06000696)
68
69ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 System.DateTimeFormat::ParseQuoteString(System.ReadOnlySpan`1<System.Char>,System.Int32,System.Text.StringBuilder)
70
71 ---> System.Exception: Basic block has to end with unconditional control flow.
72{
73 Block_0:
74 stloc:CultureInfo(var_3_09, callgetter:CultureInfo(CultureInfo::get_CurrentCulture))
75}
76
77 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
78 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
79 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
80 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
81 --- End of inner exception stack trace ---
82 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
83 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
84*/;
85 }
86
87 // Token: 0x06000697 RID: 1687 RVA: 0x0000FC90 File Offset: 0x0000DE90
88 internal static int ParseNextChar(ReadOnlySpan<char> format, int pos)
89 {
90 }
91
92 // Token: 0x06000698 RID: 1688 RVA: 0x0000FCA0 File Offset: 0x0000DEA0
94 {
95 }
96
97 // Token: 0x06000699 RID: 1689 RVA: 0x0000FCB0 File Offset: 0x0000DEB0
99 {
100 int num = 1;
101 Calendar calendar = dtfi.calendar;
102 if (result == null)
103 {
104 StringBuilder stringBuilder = StringBuilderCache.Acquire(16);
105 }
106 if (num == 0)
107 {
108 }
109 if (!true)
110 {
111 }
112 if (calendar == null)
113 {
114 }
115 if (!true)
116 {
117 }
118 if (!false)
119 {
120 }
121 if (!true)
122 {
123 }
125 return stringBuilder2;
126 }
127
128 // Token: 0x0600069A RID: 1690 RVA: 0x0000FEEC File Offset: 0x0000E0EC
130 {
131 if (!true)
132 {
133 }
135 }
136
137 // Token: 0x0600069B RID: 1691 RVA: 0x0000FF24 File Offset: 0x0000E124
139 {
140 if (!true)
141 {
142 }
143 StringBuilder stringBuilder = result.Append("Z");
144 }
145
146 // Token: 0x0600069C RID: 1692 RVA: 0x0000FFB0 File Offset: 0x0000E1B0
147 private static void Append2DigitNumber(StringBuilder result, int val)
148 {
149 StringBuilder stringBuilder = result.Append((char)val);
150 StringBuilder stringBuilder2 = result.Append((char)val);
151 }
152
153 // Token: 0x0600069D RID: 1693 RVA: 0x0000FFD0 File Offset: 0x0000E1D0
155 {
156 return "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK";
157 }
158
159 // Token: 0x0600069E RID: 1694 RVA: 0x00010060 File Offset: 0x0000E260
161 {
163 string text;
164 return text;
165 }
166
167 // Token: 0x0600069F RID: 1695 RVA: 0x000100AC File Offset: 0x0000E2AC
168 internal static string Format(DateTime dateTime, string format, IFormatProvider provider)
169 {
170 if (!true)
171 {
172 }
173 string text;
174 return text;
175 }
176
177 // Token: 0x060006A0 RID: 1696 RVA: 0x000100C0 File Offset: 0x0000E2C0
178 internal static string Format(DateTime dateTime, string format, IFormatProvider provider, TimeSpan offset)
179 {
180 if (dateTime != null)
181 {
182 if (!true)
183 {
184 }
186 }
187 int num;
188 if (dateTime != null)
189 {
190 num = 1;
191 while (dateTime != null)
192 {
193 }
194 }
195 if (num == 0)
196 {
197 }
198 StringBuilder stringBuilder;
199 return StringBuilderCache.GetStringAndRelease(stringBuilder);
200 }
201
202 // Token: 0x060006A1 RID: 1697 RVA: 0x00010110 File Offset: 0x0000E310
203 internal static bool TryFormat(DateTime dateTime, Span<char> destination, [Out] int charsWritten, ReadOnlySpan<char> format, IFormatProvider provider)
204 {
205 if (!true)
206 {
207 }
208 bool flag;
209 return flag;
210 }
211
212 // Token: 0x060006A2 RID: 1698 RVA: 0x00010124 File Offset: 0x0000E324
214 {
215 bool flag;
216 return flag;
217 }
218
219 // Token: 0x060006A3 RID: 1699 RVA: 0x00010160 File Offset: 0x0000E360
221 {
222 if (format != null)
223 {
224 return "s";
225 }
226 Calendar calendar = dtfi.calendar;
228 if (160 == 0)
229 {
230 }
231 string text;
232 if ("s" != null || text != null)
233 {
234 char rawStringData = text.GetRawStringData();
235 int stringLength = text._stringLength;
236 string text2;
237 if (text2 != null)
238 {
239 char rawStringData2 = text2.GetRawStringData();
240 int stringLength2 = text2._stringLength;
241 while (text2 != null)
242 {
243 }
244 }
245 }
246 StringBuilder stringBuilder;
247 return stringBuilder;
248 }
249
250 // Token: 0x060006A4 RID: 1700 RVA: 0x000101D0 File Offset: 0x0000E3D0
251 private static bool TryFormatO(DateTime dateTime, TimeSpan offset, Span<char> destination, [Out] int charsWritten)
252 {
253 if (!true)
254 {
255 }
256 bool flag;
257 return flag;
258 }
259
260 // Token: 0x060006A5 RID: 1701 RVA: 0x00010290 File Offset: 0x0000E490
261 private static bool TryFormatR(DateTime dateTime, TimeSpan offset, Span<char> destination, [Out] int charsWritten)
262 {
263 /*
264An exception occurred when decompiling this method (060006A5)
265
266ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean System.DateTimeFormat::TryFormatR(System.DateTime,System.TimeSpan,System.Span`1<System.Char>,System.Int32)
267
268 ---> System.Exception: Basic block has to end with unconditional control flow.
269{
270 IL_0007:
271 stfld:int64(TimeSpan::_ticks, ldloc:TimeSpan[exp:valuetype System.TimeSpan&](offset), ldloc:char[exp:int64](var_6))
272 stloc:int32(var_25_52, ldc.i4:int32(29))
273 stfld:int32(int32::m_value, ldloc:int32[exp:int32&](charsWritten), ldloc:int32(var_25_52))
274}
275
276 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
277 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
278 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
279 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
280 --- End of inner exception stack trace ---
281 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
282 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
283*/;
284 }
285
286 // Token: 0x060006A6 RID: 1702 RVA: 0x000102F8 File Offset: 0x0000E4F8
288 {
289 int num = 52429;
291 }
292
293 // Token: 0x060006A7 RID: 1703 RVA: 0x00010314 File Offset: 0x0000E514
294 private static void WriteFourDecimalDigits(uint value, Span<char> buffer, int startingIndex = 0)
295 {
296 int num = 52429;
297 int num2 = 19923;
298 buffer._pointer = num;
300 }
301
302 // Token: 0x060006A8 RID: 1704 RVA: 0x0001033C File Offset: 0x0000E53C
303 private static void WriteDigits(ulong value, Span<char> buffer)
304 {
305 }
306
307 // Token: 0x060006A9 RID: 1705 RVA: 0x00010354 File Offset: 0x0000E554
309 {
310 }
311
312 // Token: 0x060006AA RID: 1706 RVA: 0x00010364 File Offset: 0x0000E564
313 // Note: this type is marked as 'beforefieldinit'.
315 {
316 if (!true)
317 {
318 }
320 if (("0" == null || "0" != null) && ("00" == null || "00" != null) && ("000" == null || "000" != null) && ("0000" == null || "0000" != null) && ("00000" == null || "00000" != null) && ("000000" == null || "000000" != null) && ("0000000" == null || "0000000" != null))
321 {
322 return;
323 }
324 throw new ArrayTypeMismatchException();
325 }
326
327 // Token: 0x0400026F RID: 623
328 internal static readonly TimeSpan NullOffset;
329
330 // Token: 0x04000270 RID: 624
331 internal static char[] allStandardFormats;
332
333 // Token: 0x04000271 RID: 625
335
336 // Token: 0x04000272 RID: 626
337 internal static readonly string[] InvariantAbbreviatedMonthNames;
338
339 // Token: 0x04000273 RID: 627
340 internal static readonly string[] InvariantAbbreviatedDayNames;
341
342 // Token: 0x04000274 RID: 628
343 internal static string[] fixedNumberFormats;
344 }
345}
class f__AnonymousType0<< Count > j__TPar
static void InvalidFormatForLocal(ReadOnlySpan< char > format, DateTime dateTime)
static int ParseNextChar(ReadOnlySpan< char > format, int pos)
static readonly string[] InvariantAbbreviatedDayNames
static string FormatMonth(int month, int repeatCount, DateTimeFormatInfo dtfi)
static string Format(DateTime dateTime, string format, IFormatProvider provider, TimeSpan offset)
static string FormatHebrewMonthName(DateTime time, int month, int repeatCount, DateTimeFormatInfo dtfi)
static bool TryFormatR(DateTime dateTime, TimeSpan offset, Span< char > destination, [Out] int charsWritten)
static bool IsUseGenitiveForm(ReadOnlySpan< char > format, int index, int tokenLen, char patternToMatch)
static StringBuilder FormatCustomized(DateTime dateTime, ReadOnlySpan< char > format, DateTimeFormatInfo dtfi, TimeSpan offset, StringBuilder result)
static StringBuilder FormatStringBuilder(DateTime dateTime, ReadOnlySpan< char > format, DateTimeFormatInfo dtfi, TimeSpan offset)
static readonly DateTimeFormatInfo InvariantFormatInfo
static int ParseRepeatPattern(ReadOnlySpan< char > format, int pos, char patternChar)
static string FormatDayOfWeek(int dayOfWeek, int repeat, DateTimeFormatInfo dtfi)
static string Format(DateTime dateTime, string format, IFormatProvider provider)
static readonly TimeSpan NullOffset
static char[] allStandardFormats
static void WriteTwoDecimalDigits(uint value, Span< char > destination, int offset)
static int ParseQuoteString(ReadOnlySpan< char > format, int pos, StringBuilder result)
static void FormatDigits(StringBuilder outputBuffer, int value, int len)
static bool TryFormat(DateTime dateTime, Span< char > destination, [Out] int charsWritten, ReadOnlySpan< char > format, IFormatProvider provider, TimeSpan offset)
static void WriteDigits(ulong value, Span< char > buffer)
static bool TryFormat(DateTime dateTime, Span< char > destination, [Out] int charsWritten, ReadOnlySpan< char > format, IFormatProvider provider)
static string[] fixedNumberFormats
static bool TryFormatO(DateTime dateTime, TimeSpan offset, Span< char > destination, [Out] int charsWritten)
static void FormatDigits(StringBuilder outputBuffer, int value, int len, bool overrideLengthLimit)
static void HebrewFormatDigits(StringBuilder outputBuffer, int digits)
static readonly string[] InvariantAbbreviatedMonthNames
static void WriteFourDecimalDigits(uint value, Span< char > buffer, int startingIndex=0)
static void FormatCustomizedTimeZone(DateTime dateTime, TimeSpan offset, ReadOnlySpan< char > format, int tokenLen, bool timeOnly, StringBuilder result)
static string GetRealFormat(ReadOnlySpan< char > format, DateTimeFormatInfo dtfi)
static string ExpandPredefinedFormat(ReadOnlySpan< char > format, DateTime dateTime, DateTimeFormatInfo dtfi, TimeSpan offset)
static void FormatCustomizedRoundripTimeZone(DateTime dateTime, TimeSpan offset, StringBuilder result)
static void Append2DigitNumber(StringBuilder result, int val)
static CultureInfo InvariantCulture
static string ToString(int Number)
static string GetStringAndRelease(StringBuilder sb)
static StringBuilder Acquire(int capacity=16)
StringBuilder Append(char value, int repeatCount)
static void ThrowArgumentOutOfRangeException()
static DateTime Now
Definition DateTime.cs:530