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
XmlEventCache.cs
Go to the documentation of this file.
1using System;
5
6namespace System.Xml
7{
8 // Token: 0x02000034 RID: 52
9 internal sealed class XmlEventCache : XmlRawWriter
10 {
11 // Token: 0x0600019F RID: 415 RVA: 0x00006390 File Offset: 0x00004590
12 public XmlEventCache(string baseUri, bool hasRootNode)
13 {
15 }
16
17 // Token: 0x060001A0 RID: 416 RVA: 0x000063AC File Offset: 0x000045AC
18 public void EndEvents()
19 {
20 if (this.singleText.idxStr == 0)
21 {
22 int num = this.NewEvent();
24 }
25 }
26
27 // Token: 0x060001A1 RID: 417 RVA: 0x000063D4 File Offset: 0x000045D4
28 public void EventsToWriter(XmlWriter writer)
29 {
30 if (this.singleText.idxStr != 0)
31 {
32 return;
33 }
34 if (writer != null)
35 {
36 }
37 }
38
39 // Token: 0x060001A2 RID: 418 RVA: 0x00006474 File Offset: 0x00004674
40 public override void WriteDocType(string name, string pubid, string sysid, string subset)
41 {
42 int num = this.NewEvent();
44 }
45
46 // Token: 0x060001A3 RID: 419 RVA: 0x00006494 File Offset: 0x00004694
47 public override void WriteStartElement(string prefix, string localName, string ns)
48 {
49 int num = this.NewEvent();
51 }
52
53 // Token: 0x060001A4 RID: 420 RVA: 0x000064B4 File Offset: 0x000046B4
54 public override void WriteStartAttribute(string prefix, string localName, string ns)
55 {
56 int num = this.NewEvent();
58 }
59
60 // Token: 0x060001A5 RID: 421 RVA: 0x000064D4 File Offset: 0x000046D4
61 public override void WriteEndAttribute()
62 {
63 int num = this.NewEvent();
65 }
66
67 // Token: 0x060001A6 RID: 422 RVA: 0x000064F4 File Offset: 0x000046F4
68 public override void WriteCData(string text)
69 {
70 int num = this.NewEvent();
72 }
73
74 // Token: 0x060001A7 RID: 423 RVA: 0x00006514 File Offset: 0x00004714
75 public override void WriteComment(string text)
76 {
77 int num = this.NewEvent();
79 }
80
81 // Token: 0x060001A8 RID: 424 RVA: 0x00006534 File Offset: 0x00004734
82 public override void WriteProcessingInstruction(string name, string text)
83 {
84 int num = this.NewEvent();
86 }
87
88 // Token: 0x060001A9 RID: 425 RVA: 0x00006554 File Offset: 0x00004754
89 public override void WriteWhitespace(string ws)
90 {
91 int num = this.NewEvent();
93 }
94
95 // Token: 0x060001AA RID: 426 RVA: 0x00006574 File Offset: 0x00004774
96 public override void WriteString(string text)
97 {
98 if (this.pages != null)
99 {
100 int num = this.NewEvent();
102 int num2 = 9;
103 array.o = num2;
104 return;
105 }
106 }
107
108 // Token: 0x060001AB RID: 427 RVA: 0x000065A4 File Offset: 0x000047A4
109 public override void WriteChars(char[] buffer, int index, int count)
110 {
111 }
112
113 // Token: 0x060001AC RID: 428 RVA: 0x000065B4 File Offset: 0x000047B4
114 public override void WriteRaw(char[] buffer, int index, int count)
115 {
116 }
117
118 // Token: 0x060001AD RID: 429 RVA: 0x000065C4 File Offset: 0x000047C4
119 public override void WriteRaw(string data)
120 {
121 int num = this.NewEvent();
122 this.pageCurr.o = 10;
123 }
124
125 // Token: 0x060001AE RID: 430 RVA: 0x000065E8 File Offset: 0x000047E8
126 public override void WriteEntityRef(string name)
127 {
128 int num = this.NewEvent();
129 this.pageCurr.o = 11;
130 }
131
132 // Token: 0x060001AF RID: 431 RVA: 0x0000660C File Offset: 0x0000480C
133 public override void WriteCharEntity(char ch)
134 {
135 int num = this.NewEvent();
136 this.pageCurr.o = 12;
137 }
138
139 // Token: 0x060001B0 RID: 432 RVA: 0x00006630 File Offset: 0x00004830
140 public override void WriteSurrogateCharEntity(char lowChar, char highChar)
141 {
142 int num = this.NewEvent();
143 this.pageCurr.o = 13;
144 }
145
146 // Token: 0x060001B1 RID: 433 RVA: 0x00006654 File Offset: 0x00004854
147 public override void WriteBase64(byte[] buffer, int index, int count)
148 {
149 byte[] array = XmlEventCache.ToBytes(buffer, index, count);
150 int num = this.NewEvent();
151 this.pageCurr.o = 14;
152 }
153
154 // Token: 0x060001B2 RID: 434 RVA: 0x00006680 File Offset: 0x00004880
155 public override void WriteBinHex(byte[] buffer, int index, int count)
156 {
157 byte[] array = XmlEventCache.ToBytes(buffer, index, count);
158 int num = this.NewEvent();
159 this.pageCurr.o = 15;
160 }
161
162 // Token: 0x060001B3 RID: 435 RVA: 0x000066AC File Offset: 0x000048AC
163 public override void Close()
164 {
165 int num = this.NewEvent();
166 this.pageCurr.o = 23;
167 }
168
169 // Token: 0x060001B4 RID: 436 RVA: 0x000066D0 File Offset: 0x000048D0
170 public override void Flush()
171 {
172 int num = this.NewEvent();
173 this.pageCurr.o = 24;
174 }
175
176 // Token: 0x060001B5 RID: 437 RVA: 0x000066F4 File Offset: 0x000048F4
177 public override void WriteValue(string value)
178 {
179 }
180
181 // Token: 0x060001B6 RID: 438 RVA: 0x00006704 File Offset: 0x00004904
182 protected override void Dispose(bool disposing)
183 {
184 int num = this.NewEvent();
185 this.pageCurr.o = 25;
186 base.Dispose(disposing);
187 }
188
189 // Token: 0x060001B7 RID: 439 RVA: 0x00006750 File Offset: 0x00004950
190 internal override void WriteXmlDeclaration(XmlStandalone standalone)
191 {
192 int num = this.NewEvent();
193 this.pageCurr.o = 16;
194 }
195
196 // Token: 0x060001B8 RID: 440 RVA: 0x00006774 File Offset: 0x00004974
197 internal override void WriteXmlDeclaration(string xmldecl)
198 {
199 int num = this.NewEvent();
200 this.pageCurr.o = 17;
201 }
202
203 // Token: 0x060001B9 RID: 441 RVA: 0x00006798 File Offset: 0x00004998
204 internal override void StartElementContent()
205 {
206 int num = this.NewEvent();
207 this.pageCurr.o = 18;
208 }
209
210 // Token: 0x060001BA RID: 442 RVA: 0x000067BC File Offset: 0x000049BC
211 internal override void WriteEndElement(string prefix, string localName, string ns)
212 {
213 int num = this.NewEvent();
214 this.pageCurr.o = 19;
215 }
216
217 // Token: 0x060001BB RID: 443 RVA: 0x000067E0 File Offset: 0x000049E0
218 internal override void WriteFullEndElement(string prefix, string localName, string ns)
219 {
220 int num = this.NewEvent();
221 this.pageCurr.o = 20;
222 }
223
224 // Token: 0x060001BC RID: 444 RVA: 0x00006804 File Offset: 0x00004A04
225 internal override void WriteNamespaceDeclaration(string prefix, string ns)
226 {
227 int num = this.NewEvent();
228 this.pageCurr.o = 21;
229 }
230
231 // Token: 0x060001BD RID: 445 RVA: 0x00006828 File Offset: 0x00004A28
232 internal override void WriteEndBase64()
233 {
234 int num = this.NewEvent();
235 this.pageCurr.o = 22;
236 }
237
238 // Token: 0x060001BE RID: 446 RVA: 0x0000684C File Offset: 0x00004A4C
239 private void AddEvent(XmlEventCache.XmlEventType eventType)
240 {
241 int num = this.NewEvent();
242 this.pageCurr.o = eventType;
243 }
244
245 // Token: 0x060001BF RID: 447 RVA: 0x0000686C File Offset: 0x00004A6C
246 private void AddEvent(XmlEventCache.XmlEventType eventType, string s1)
247 {
248 int num = this.NewEvent();
249 this.pageCurr.o = eventType;
250 }
251
252 // Token: 0x060001C0 RID: 448 RVA: 0x0000688C File Offset: 0x00004A8C
253 private void AddEvent(XmlEventCache.XmlEventType eventType, string s1, string s2)
254 {
255 int num = this.NewEvent();
256 this.pageCurr.o = eventType;
257 }
258
259 // Token: 0x060001C1 RID: 449 RVA: 0x000068AC File Offset: 0x00004AAC
260 private void AddEvent(XmlEventCache.XmlEventType eventType, string s1, string s2, string s3)
261 {
262 int num = this.NewEvent();
263 this.pageCurr.o = eventType;
264 }
265
266 // Token: 0x060001C2 RID: 450 RVA: 0x000068CC File Offset: 0x00004ACC
267 private void AddEvent(XmlEventCache.XmlEventType eventType, string s1, string s2, string s3, object o)
268 {
269 int num = this.NewEvent();
270 this.pageCurr.o = eventType;
271 }
272
273 // Token: 0x060001C3 RID: 451 RVA: 0x000068EC File Offset: 0x00004AEC
274 private void AddEvent(XmlEventCache.XmlEventType eventType, object o)
275 {
276 int num = this.NewEvent();
277 this.pageCurr.o = eventType;
278 }
279
280 // Token: 0x060001C4 RID: 452 RVA: 0x00003FFD File Offset: 0x000021FD
281 private int NewEvent()
282 {
283 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
284 }
285
286 // Token: 0x060001C5 RID: 453 RVA: 0x0000690C File Offset: 0x00004B0C
287 private static byte[] ToBytes(byte[] buffer, int index, int count)
288 {
289 /*
290An exception occurred when decompiling this method (060001C5)
291
292ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] System.Xml.XmlEventCache::ToBytes(System.Byte[],System.Int32,System.Int32)
293
294 ---> System.Exception: Basic block has to end with unconditional control flow.
295{
296 IL_0000:
297 brtrue(IL_0000, ldloc:uint8[][exp:bool](buffer))
298}
299
300 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
301 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
302 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
303 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
304 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
305 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
306 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
307 --- End of inner exception stack trace ---
308 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
309 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
310*/;
311 }
312
313 // Token: 0x040000AD RID: 173
315
316 // Token: 0x040000AE RID: 174
318
319 // Token: 0x040000AF RID: 175
320 private int pageSize;
321
322 // Token: 0x040000B0 RID: 176
323 private bool hasRootNode;
324
325 // Token: 0x040000B1 RID: 177
327
328 // Token: 0x040000B2 RID: 178
329 private string baseUri;
330
331 // Token: 0x02000035 RID: 53
332 private enum XmlEventType
333 {
334 // Token: 0x040000B4 RID: 180
335 Unknown,
336 // Token: 0x040000B5 RID: 181
337 DocType,
338 // Token: 0x040000B6 RID: 182
339 StartElem,
340 // Token: 0x040000B7 RID: 183
341 StartAttr,
342 // Token: 0x040000B8 RID: 184
343 EndAttr,
344 // Token: 0x040000B9 RID: 185
345 CData,
346 // Token: 0x040000BA RID: 186
347 Comment,
348 // Token: 0x040000BB RID: 187
349 PI,
350 // Token: 0x040000BC RID: 188
352 // Token: 0x040000BD RID: 189
353 String,
354 // Token: 0x040000BE RID: 190
355 Raw,
356 // Token: 0x040000BF RID: 191
357 EntRef,
358 // Token: 0x040000C0 RID: 192
359 CharEnt,
360 // Token: 0x040000C1 RID: 193
362 // Token: 0x040000C2 RID: 194
363 Base64,
364 // Token: 0x040000C3 RID: 195
365 BinHex,
366 // Token: 0x040000C4 RID: 196
367 XmlDecl1,
368 // Token: 0x040000C5 RID: 197
369 XmlDecl2,
370 // Token: 0x040000C6 RID: 198
372 // Token: 0x040000C7 RID: 199
373 EndElem,
374 // Token: 0x040000C8 RID: 200
376 // Token: 0x040000C9 RID: 201
377 Nmsp,
378 // Token: 0x040000CA RID: 202
379 EndBase64,
380 // Token: 0x040000CB RID: 203
381 Close,
382 // Token: 0x040000CC RID: 204
383 Flush,
384 // Token: 0x040000CD RID: 205
385 Dispose
386 }
387
388 // Token: 0x02000036 RID: 54
389 private struct XmlEvent
390 {
391 // Token: 0x060001C6 RID: 454 RVA: 0x00006920 File Offset: 0x00004B20
396
397 // Token: 0x060001C7 RID: 455 RVA: 0x00006934 File Offset: 0x00004B34
399 {
401 this.s1 = s1;
402 }
403
404 // Token: 0x060001C8 RID: 456 RVA: 0x00006950 File Offset: 0x00004B50
405 public void InitEvent(XmlEventCache.XmlEventType eventType, string s1, string s2)
406 {
408 this.s1 = s1;
409 this.s2 = s2;
410 }
411
412 // Token: 0x060001C9 RID: 457 RVA: 0x00006974 File Offset: 0x00004B74
413 public void InitEvent(XmlEventCache.XmlEventType eventType, string s1, string s2, string s3)
414 {
416 this.s1 = s1;
417 this.s2 = s2;
418 this.s3 = s3;
419 }
420
421 // Token: 0x060001CA RID: 458 RVA: 0x000069A0 File Offset: 0x00004BA0
422 public void InitEvent(XmlEventCache.XmlEventType eventType, string s1, string s2, string s3, object o)
423 {
425 this.s1 = s1;
426 this.s2 = s2;
427 this.s3 = s3;
428 this.o = o;
429 }
430
431 // Token: 0x060001CB RID: 459 RVA: 0x000069D4 File Offset: 0x00004BD4
433 {
435 this.o = o;
436 }
437
438 // Token: 0x1700003B RID: 59
439 // (get) Token: 0x060001CC RID: 460 RVA: 0x00003FFD File Offset: 0x000021FD
441 {
442 get
443 {
444 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
445 }
446 }
447
448 // Token: 0x1700003C RID: 60
449 // (get) Token: 0x060001CD RID: 461 RVA: 0x000069F0 File Offset: 0x00004BF0
450 public string String1
451 {
452 get
453 {
454 return this.s1;
455 }
456 }
457
458 // Token: 0x1700003D RID: 61
459 // (get) Token: 0x060001CE RID: 462 RVA: 0x00006A04 File Offset: 0x00004C04
460 public string String2
461 {
462 get
463 {
464 return this.s2;
465 }
466 }
467
468 // Token: 0x1700003E RID: 62
469 // (get) Token: 0x060001CF RID: 463 RVA: 0x00006A18 File Offset: 0x00004C18
470 public string String3
471 {
472 get
473 {
474 return this.s3;
475 }
476 }
477
478 // Token: 0x1700003F RID: 63
479 // (get) Token: 0x060001D0 RID: 464 RVA: 0x00006A2C File Offset: 0x00004C2C
480 public object Object
481 {
482 get
483 {
484 return this.o;
485 }
486 }
487
488 // Token: 0x040000CE RID: 206
490
491 // Token: 0x040000CF RID: 207
492 private string s1;
493
494 // Token: 0x040000D0 RID: 208
495 private string s2;
496
497 // Token: 0x040000D1 RID: 209
498 private string s3;
499
500 // Token: 0x040000D2 RID: 210
501 private object o;
502 }
503 }
504}
class f__AnonymousType0<< Count > j__TPar
void AddEvent(XmlEventCache.XmlEventType eventType, string s1, string s2, string s3)
override void WriteEndBase64()
XmlEventCache(string baseUri, bool hasRootNode)
override void WriteCharEntity(char ch)
override void WriteXmlDeclaration(XmlStandalone standalone)
void AddEvent(XmlEventCache.XmlEventType eventType, string s1, string s2)
override void WriteDocType(string name, string pubid, string sysid, string subset)
override void WriteRaw(string data)
override void WriteChars(char[] buffer, int index, int count)
override void StartElementContent()
override void WriteBase64(byte[] buffer, int index, int count)
override void WriteProcessingInstruction(string name, string text)
override void WriteWhitespace(string ws)
override void WriteBinHex(byte[] buffer, int index, int count)
override void WriteStartElement(string prefix, string localName, string ns)
override void WriteEndAttribute()
void AddEvent(XmlEventCache.XmlEventType eventType, object o)
override void WriteEntityRef(string name)
override void WriteNamespaceDeclaration(string prefix, string ns)
override void WriteValue(string value)
override void WriteXmlDeclaration(string xmldecl)
override void Dispose(bool disposing)
override void WriteCData(string text)
void EventsToWriter(XmlWriter writer)
void AddEvent(XmlEventCache.XmlEventType eventType)
void AddEvent(XmlEventCache.XmlEventType eventType, string s1)
override void WriteEndElement(string prefix, string localName, string ns)
XmlEventCache.XmlEvent[] pageCurr
override void WriteComment(string text)
static byte[] ToBytes(byte[] buffer, int index, int count)
override void WriteSurrogateCharEntity(char lowChar, char highChar)
void AddEvent(XmlEventCache.XmlEventType eventType, string s1, string s2, string s3, object o)
override void WriteRaw(char[] buffer, int index, int count)
List< XmlEventCache.XmlEvent[]> pages
override void WriteStartAttribute(string prefix, string localName, string ns)
override void WriteFullEndElement(string prefix, string localName, string ns)
override void WriteString(string text)
void InitEvent(XmlEventCache.XmlEventType eventType, string s1)
XmlEventCache.XmlEventType eventType
XmlEventCache.XmlEventType EventType
void InitEvent(XmlEventCache.XmlEventType eventType)
void InitEvent(XmlEventCache.XmlEventType eventType, string s1, string s2)
void InitEvent(XmlEventCache.XmlEventType eventType, string s1, string s2, string s3)
void InitEvent(XmlEventCache.XmlEventType eventType, string s1, string s2, string s3, object o)
void InitEvent(XmlEventCache.XmlEventType eventType, object o)