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
XmlEncodedRawTextWriter.cs
Go to the documentation of this file.
1using System;
3using System.IO;
5using System.Text;
7
8namespace System.Xml
9{
10 // Token: 0x02000032 RID: 50
12 {
13 // Token: 0x06000150 RID: 336 RVA: 0x00004C78 File Offset: 0x00002E78
15 {
17 this.xmlCharType = instance;
18 this.bufLen = 6144;
19 base..ctor();
20 bool flag = settings.useAsync;
21 this.useAsync = flag;
24 bool omitXmlDecl = settings.omitXmlDecl;
25 this.omitXmlDeclaration = omitXmlDecl;
26 string text = settings.newLineChars;
28 bool flag2 = settings.checkCharacters;
30 bool flag3 = settings.closeOutput;
36 bool flag4 = settings.mergeCDataSections;
38 if (newLineHandling == NewLineHandling.Replace && flag2)
39 {
40 long num = 0L;
41 this.ValidateContentChars(text, "NewLineChars", num != 0L);
42 return;
43 }
44 }
45
46 // Token: 0x06000151 RID: 337 RVA: 0x00004D4C File Offset: 0x00002F4C
48 {
51 if (settings.useAsync)
52 {
53 int num = 1;
54 this.bufLen = num;
55 return;
56 }
57 int num2 = this.bufLen;
58 if (settings.autoXmlDecl)
59 {
61 int num3 = 1;
62 this.autoXmlDeclaration = num3 != 0;
63 }
64 }
65
66 // Token: 0x06000152 RID: 338 RVA: 0x00004DA0 File Offset: 0x00002FA0
68 {
70 Encoding encoding = settings.encoding;
72 if (settings.useAsync)
73 {
74 int num = 1;
75 this.bufLen = num;
76 return;
77 }
78 int num2 = this.bufLen;
79 int num3 = 1;
80 this.trackTextContent = num3 != 0;
81 Encoding encoding2 = settings.encoding;
82 if (encoding2 != null)
83 {
85 throw new InvalidCastException();
86 }
91 if (stream == null && this.encoding.dataItem != null)
92 {
93 Stream stream2 = this.stream;
94 }
95 if (settings.autoXmlDecl)
96 {
98 int num4 = 1;
99 this.autoXmlDeclaration = num4 != 0;
100 }
101 }
102
103 // Token: 0x06000153 RID: 339 RVA: 0x00004E5C File Offset: 0x0000305C
105 {
106 if (this.omitXmlDeclaration || this.autoXmlDeclaration)
107 {
108 return;
109 }
110 if (this.trackTextContent && this.inTextContent)
111 {
112 long num = 0L;
113 this.ChangeTextContentMark(num != 0L);
114 }
115 this.RawText("<?xml version=\"");
116 this.RawText("1.0");
117 if (this.encoding != null)
118 {
119 this.RawText("\" encoding=\"");
121 }
122 if (standalone != XmlStandalone.Omit)
123 {
124 this.RawText("\" standalone=\"");
125 this.RawText("\" standalone=\"");
126 }
127 this.RawText("\"?>");
128 }
129
130 // Token: 0x06000154 RID: 340 RVA: 0x00004EE8 File Offset: 0x000030E8
131 internal override void WriteXmlDeclaration(string xmldecl)
132 {
133 if (this.omitXmlDeclaration || this.autoXmlDeclaration)
134 {
135 return;
136 }
137 }
138
139 // Token: 0x06000155 RID: 341 RVA: 0x00004F08 File Offset: 0x00003108
140 public override void WriteDocType(string name, string pubid, string sysid, string subset)
141 {
142 if (this.trackTextContent && this.inTextContent)
143 {
144 long num = 0L;
145 this.ChangeTextContentMark(num != 0L);
146 }
147 this.RawText("<!DOCTYPE ");
148 this.RawText(name);
149 if (pubid != null)
150 {
151 this.RawText(" PUBLIC \"");
152 this.RawText(pubid);
153 this.RawText("\" \"");
154 if (sysid == null)
155 {
156 return;
157 }
158 }
159 else
160 {
161 if (sysid == null)
162 {
163 int num2 = this.bufPos;
164 char[] array = this.bufChars;
165 return;
166 }
167 this.RawText(" SYSTEM \"");
168 }
169 this.RawText(sysid);
170 int num3 = this.bufPos;
171 char[] array2 = this.bufChars;
172 if (subset != null)
173 {
174 int num4 = 91;
176 this.RawText(subset);
177 char[] array3 = this.bufChars;
179 }
181 }
182
183 // Token: 0x06000156 RID: 342 RVA: 0x00004FD4 File Offset: 0x000031D4
184 public override void WriteStartElement(string prefix, string localName, string ns)
185 {
186 if (this.trackTextContent && this.inTextContent)
187 {
188 long num = 0L;
189 this.ChangeTextContentMark(num != 0L);
190 }
191 char[] array = this.bufChars;
192 if (prefix != null && prefix._stringLength != 0)
193 {
194 this.RawText(prefix);
195 char[] array2 = this.bufChars;
196 }
197 this.RawText(localName);
198 int num2 = this.bufPos;
200 }
201
202 // Token: 0x06000157 RID: 343 RVA: 0x00005038 File Offset: 0x00003238
203 internal override void StartElementContent()
204 {
205 char[] array = this.bufChars;
206 }
207
208 // Token: 0x06000158 RID: 344 RVA: 0x0000504C File Offset: 0x0000324C
209 internal override void WriteEndElement(string prefix, string localName, string ns)
210 {
211 if (this.trackTextContent && this.inTextContent)
212 {
213 long num = 0L;
214 this.ChangeTextContentMark(num != 0L);
215 }
216 char[] array = this.bufChars;
217 }
218
219 // Token: 0x06000159 RID: 345 RVA: 0x000050EC File Offset: 0x000032EC
220 internal override void WriteFullEndElement(string prefix, string localName, string ns)
221 {
222 if (this.trackTextContent && this.inTextContent)
223 {
224 long num = 0L;
225 this.ChangeTextContentMark(num != 0L);
226 }
227 char[] array = this.bufChars;
228 int num2 = 60;
229 int num3 = 47;
230 array.m_value = (char)num2;
231 array.m_value = (char)num3;
232 if (prefix != null && prefix._stringLength != 0)
233 {
234 this.RawText(prefix);
235 char[] array2 = this.bufChars;
237 }
238 this.RawText(localName);
239 char[] array3 = this.bufChars;
241 }
242
243 // Token: 0x0600015A RID: 346 RVA: 0x0000516C File Offset: 0x0000336C
244 public override void WriteStartAttribute(string prefix, string localName, string ns)
245 {
246 if (this.trackTextContent && this.inTextContent)
247 {
248 long num = 0L;
249 this.ChangeTextContentMark(num != 0L);
250 }
251 int num2 = this.bufPos;
252 char[] array = this.bufChars;
253 if (prefix != null)
254 {
255 int stringLength = prefix._stringLength;
256 this.RawText(prefix);
257 char[] array2 = this.bufChars;
258 }
259 this.RawText(localName);
260 char[] array3 = this.bufChars;
261 int num3 = 61;
262 int num4 = 34;
263 int num5 = 1;
264 array3.m_value = (char)num3;
265 array3.m_value = (char)num4;
267 }
268
269 // Token: 0x0600015B RID: 347 RVA: 0x000051F8 File Offset: 0x000033F8
270 public override void WriteEndAttribute()
271 {
272 if (this.trackTextContent && this.inTextContent)
273 {
274 long num = 0L;
275 this.ChangeTextContentMark(num != 0L);
276 }
277 char[] array = this.bufChars;
278 }
279
280 // Token: 0x0600015C RID: 348 RVA: 0x00005228 File Offset: 0x00003428
281 internal override void WriteNamespaceDeclaration(string prefix, string namespaceName)
282 {
283 }
284
285 // Token: 0x1700003A RID: 58
286 // (get) Token: 0x0600015D RID: 349 RVA: 0x00005238 File Offset: 0x00003438
288 {
289 get
290 {
291 return true;
292 }
293 }
294
295 // Token: 0x0600015E RID: 350 RVA: 0x00005248 File Offset: 0x00003448
296 internal override void WriteStartNamespaceDeclaration(string prefix)
297 {
298 if (this.trackTextContent && this.inTextContent)
299 {
300 long num = 0L;
301 this.ChangeTextContentMark(num != 0L);
302 }
303 if (prefix._stringLength != 0)
304 {
305 this.RawText(" xmlns:");
306 this.RawText(prefix);
307 char[] array = this.bufChars;
308 int num2 = 61;
309 int num3 = 34;
310 array.m_value = (char)num2;
311 array.m_value = (char)num3;
312 return;
313 }
314 this.RawText(" xmlns=\"");
315 bool flag = this.trackTextContent;
316 int num4 = 1;
317 this.inAttributeValue = num4 != 0;
318 if (!flag || this.inTextContent)
319 {
320 return;
321 }
322 int num5 = 1;
323 this.ChangeTextContentMark(num5 != 0);
324 }
325
326 // Token: 0x0600015F RID: 351 RVA: 0x000052DC File Offset: 0x000034DC
327 internal override void WriteEndNamespaceDeclaration()
328 {
329 if (this.trackTextContent && this.inTextContent)
330 {
331 long num = 0L;
332 this.ChangeTextContentMark(num != 0L);
333 }
334 char[] array = this.bufChars;
335 }
336
337 // Token: 0x06000160 RID: 352 RVA: 0x0000530C File Offset: 0x0000350C
338 public override void WriteCData(string text)
339 {
340 bool flag;
341 if (this.trackTextContent)
342 {
343 flag = this.inTextContent;
344 if (flag)
345 {
346 long num = 0L;
347 this.ChangeTextContentMark(num != 0L);
348 }
349 }
350 if (this.mergeCDataSections)
351 {
352 int num2 = this.cdataPos;
353 this.bufPos = (flag ? 1 : 0);
354 return;
355 }
356 char[] array = this.bufChars;
357 int num3 = 60;
358 int num4 = 33;
359 array.m_value = (char)num3;
360 int num5 = 91;
361 array.m_value = (char)num4;
362 int num6 = 67;
363 array.m_value = (char)num5;
364 array.m_value = (char)num6;
365 int num7 = 68;
366 array.m_value = (char)num7;
367 int num8 = 65;
368 array.m_value = (char)num8;
369 int num9 = 84;
370 array.m_value = (char)num9;
371 array.m_value = (char)num8;
372 this.bufPos = (flag ? 1 : 0);
373 array.m_value = (char)num5;
374 this.WriteCDataSection(text);
375 char[] array2 = this.bufChars;
376 int num10 = 93;
377 int num11 = 62;
378 array2.m_value = (char)num10;
379 array2.m_value = (char)num10;
380 array2.m_value = (char)num11;
381 }
382
383 // Token: 0x06000161 RID: 353 RVA: 0x000053F0 File Offset: 0x000035F0
384 public override void WriteComment(string text)
385 {
386 if (this.trackTextContent && this.inTextContent)
387 {
388 long num = 0L;
389 this.ChangeTextContentMark(num != 0L);
390 }
391 char[] array = this.bufChars;
392 int num2 = 60;
393 int num3 = 33;
394 int num4 = 45;
395 int num5 = 45;
396 array.m_value = (char)num2;
397 array.m_value = (char)num3;
398 array.m_value = (char)num4;
399 array.m_value = (char)num4;
400 this.WriteCommentOrPi(text, num5);
401 char[] array2 = this.bufChars;
402 int num6 = 62;
403 array2.m_value = (char)num4;
404 array2.m_value = (char)num4;
405 array2.m_value = (char)num6;
406 }
407
408 // Token: 0x06000162 RID: 354 RVA: 0x0000547C File Offset: 0x0000367C
409 public override void WriteProcessingInstruction(string name, string text)
410 {
411 if (this.trackTextContent && this.inTextContent)
412 {
413 long num = 0L;
414 this.ChangeTextContentMark(num != 0L);
415 }
416 char[] array = this.bufChars;
417 int num2 = 60;
418 int num3 = 63;
419 array.m_value = (char)num2;
420 array.m_value = (char)num3;
421 this.RawText(name);
422 int stringLength = text._stringLength;
423 char[] array2 = this.bufChars;
424 int num4 = 63;
425 this.WriteCommentOrPi(text, num4);
426 char[] array3 = this.bufChars;
427 int num5 = 62;
428 array3.m_value = (char)num3;
429 array3.m_value = (char)num5;
430 }
431
432 // Token: 0x06000163 RID: 355 RVA: 0x00005504 File Offset: 0x00003704
433 public override void WriteEntityRef(string name)
434 {
435 bool flag;
436 if (this.trackTextContent)
437 {
438 flag = this.inTextContent;
439 if (flag)
440 {
441 long num = 0L;
442 this.ChangeTextContentMark(num != 0L);
443 }
444 }
445 char[] array = this.bufChars;
446 this.RawText(name);
447 char[] array2 = this.bufChars;
448 this.bufPos = (flag ? 1 : 0);
449 int num2 = this.bufLen;
450 int num3 = this.bufPos;
452 }
453
454 // Token: 0x06000164 RID: 356 RVA: 0x00005568 File Offset: 0x00003768
455 public override void WriteCharEntity(char ch)
456 {
458 if (this.checkCharacters)
459 {
460 }
461 if (this.trackTextContent && this.inTextContent)
462 {
463 long num = 0L;
464 this.ChangeTextContentMark(num != 0L);
465 }
466 char[] array = this.bufChars;
467 int num2 = 38;
468 int num3 = 35;
469 int num4 = 120;
470 array.m_value = (char)num2;
471 array.m_value = (char)num3;
472 array.m_value = (char)num4;
473 string text;
474 this.RawText(text);
475 char[] array2 = this.bufChars;
477 int num5 = this.bufLen;
478 int num6 = this.bufPos;
480 }
481
482 // Token: 0x06000165 RID: 357 RVA: 0x0000560C File Offset: 0x0000380C
483 public override void WriteWhitespace(string ws)
484 {
485 if (this.trackTextContent && this.inTextContent)
486 {
487 long num = 0L;
488 this.ChangeTextContentMark(num != 0L);
489 }
490 if (ws != null)
491 {
493 return;
494 }
495 if (this.inAttributeValue)
496 {
497 return;
498 }
499 }
500
501 // Token: 0x06000166 RID: 358 RVA: 0x00005648 File Offset: 0x00003848
502 public override void WriteString(string text)
503 {
504 if (!this.trackTextContent || this.inTextContent)
505 {
506 if (text != null)
507 {
509 return;
510 }
511 }
512 else
513 {
514 int num = 1;
515 this.ChangeTextContentMark(num != 0);
516 while (text != null)
517 {
518 }
519 }
520 if (this.inAttributeValue)
521 {
522 return;
523 }
524 }
525
526 // Token: 0x06000167 RID: 359 RVA: 0x00005688 File Offset: 0x00003888
527 public override void WriteSurrogateCharEntity(char lowChar, char highChar)
528 {
529 if (this.trackTextContent && this.inTextContent)
530 {
531 long num = 0L;
532 this.ChangeTextContentMark(num != 0L);
533 }
534 char[] array = this.bufChars;
535 int num2 = 38;
536 int num3 = 35;
537 int num4 = 120;
538 array.m_value = (char)num2;
539 array.m_value = (char)num3;
540 array.m_value = (char)num4;
542 string text;
543 this.RawText(text);
544 char[] array2 = this.bufChars;
547 }
548
549 // Token: 0x06000168 RID: 360 RVA: 0x00005708 File Offset: 0x00003908
550 public override void WriteChars(char[] buffer, int index, int count)
551 {
552 if (this.trackTextContent && !this.inTextContent)
553 {
554 int num = 1;
555 this.ChangeTextContentMark(num != 0);
556 }
557 if (this.inAttributeValue)
558 {
559 return;
560 }
561 }
562
563 // Token: 0x06000169 RID: 361 RVA: 0x00005738 File Offset: 0x00003938
564 public override void WriteRaw(char[] buffer, int index, int count)
565 {
566 if (this.trackTextContent && this.inTextContent)
567 {
568 long num = 0L;
569 this.ChangeTextContentMark(num != 0L);
570 }
571 int num2 = this.bufPos;
573 }
574
575 // Token: 0x0600016A RID: 362 RVA: 0x0000576C File Offset: 0x0000396C
576 public override void WriteRaw(string data)
577 {
578 if (this.trackTextContent && this.inTextContent)
579 {
580 long num = 0L;
581 this.ChangeTextContentMark(num != 0L);
582 }
583 if (data != null)
584 {
586 return;
587 }
588 int num2 = this.bufPos;
590 }
591
592 // Token: 0x0600016B RID: 363 RVA: 0x000057AC File Offset: 0x000039AC
593 public override void Close()
594 {
595 this.FlushEncoder();
596 }
597
598 // Token: 0x0600016C RID: 364 RVA: 0x000057C0 File Offset: 0x000039C0
599 public override void Flush()
600 {
601 this.FlushEncoder();
602 if (this.stream != null)
603 {
604 return;
605 }
606 if (this.writer != null)
607 {
608 return;
609 }
610 }
611
612 // Token: 0x0600016D RID: 365 RVA: 0x000057E8 File Offset: 0x000039E8
613 protected virtual void FlushBuffer()
614 {
615 if (!this.writeToNull)
616 {
617 if (this.stream != null)
618 {
619 if (this.trackTextContent)
620 {
621 int[] array = this.textContentMarks;
623 int num = this.lastMarkPos;
626 int num2 = 1;
628 }
629 int num3 = this.bufPos;
630 int num4 = 1;
631 int num5 = 1;
632 this.EncodeChars(num4, num3, num5 != 0);
633 return;
634 }
635 TextWriter textWriter = this.writer;
636 char[] array2 = this.bufChars;
637 int num6 = this.bufPos;
638 }
639 long num7 = 0L;
640 int num8 = this.bufPos;
641 char[] array3 = this.bufChars;
642 int num9 = 1;
643 int num10 = this.textPos;
644 int num11 = this.attrEndPos;
648 if (num7 == 0L)
649 {
650 return;
651 }
652 throw new OutOfMemoryException();
653 }
654
655 // Token: 0x0600016E RID: 366 RVA: 0x00005914 File Offset: 0x00003B14
656 private void EncodeChars(int startOffset, int endOffset, bool writeAllToStream)
657 {
659 if (charEntityEncoderFallback != null)
660 {
662 }
663 char[] array = this.bufChars;
664 Encoder encoder = this.encoder;
665 byte[] array2 = this.bufBytes;
666 int num = this.bufBytesUsed;
667 int num2 = this.bufBytesUsed;
668 byte[] array3 = this.bufBytes;
669 this.bufBytesUsed = (writeAllToStream ? 1 : 0);
670 Stream stream = this.stream;
671 int num3 = this.bufBytesUsed;
672 byte[] array4 = this.bufBytes;
673 Stream stream2 = this.stream;
674 }
675
676 // Token: 0x0600016F RID: 367 RVA: 0x00005988 File Offset: 0x00003B88
677 private void FlushEncoder()
678 {
679 if (this.stream != null)
680 {
681 Encoder encoder = this.encoder;
682 byte[] array = this.bufBytes;
683 char[] array2 = this.bufChars;
684 if (false)
685 {
686 byte[] array3 = this.bufBytes;
687 Stream stream = this.stream;
688 }
689 }
690 }
691
692 // Token: 0x06000170 RID: 368 RVA: 0x000059C4 File Offset: 0x00003BC4
693 protected unsafe void WriteAttributeTextBlock(char* pSrc, char* pSrcEnd)
694 {
695 if (this.bufChars != null)
696 {
697 return;
698 }
700 }
701
702 // Token: 0x06000171 RID: 369 RVA: 0x00005A60 File Offset: 0x00003C60
703 protected unsafe void WriteElementTextBlock(char* pSrc, char* pSrcEnd)
704 {
705 if (this.bufChars != null)
706 {
707 return;
708 }
710 }
711
712 // Token: 0x06000172 RID: 370 RVA: 0x00005AF8 File Offset: 0x00003CF8
713 protected void RawText(string s)
714 {
715 if (s != null)
716 {
718 return;
719 }
720 }
721
722 // Token: 0x06000173 RID: 371 RVA: 0x00005B14 File Offset: 0x00003D14
723 protected unsafe void RawText(char* pSrcBegin, char* pSrcEnd)
724 {
725 if (this.bufChars != null)
726 {
727 return;
728 }
729 }
730
731 // Token: 0x06000174 RID: 372 RVA: 0x00005B50 File Offset: 0x00003D50
733 {
734 if (this.bufChars != null)
735 {
736 return;
737 }
739 }
740
741 // Token: 0x06000175 RID: 373 RVA: 0x00005BBC File Offset: 0x00003DBC
742 protected void WriteCommentOrPi(string text, int stopChar)
743 {
744 if (text._stringLength == 0)
745 {
746 int num = this.bufPos;
747 int num2 = this.bufLen;
748 return;
749 }
751 if (this.bufChars != null)
752 {
753 return;
754 }
756 }
757
758 // Token: 0x06000176 RID: 374 RVA: 0x00005C64 File Offset: 0x00003E64
759 protected void WriteCDataSection(string text)
760 {
761 if (text._stringLength == 0)
762 {
763 int num = this.bufPos;
764 int num2 = this.bufLen;
765 return;
766 }
768 if (this.bufChars != null)
769 {
770 return;
771 }
773 }
774
775 // Token: 0x06000177 RID: 375 RVA: 0x00005D2C File Offset: 0x00003F2C
776 private unsafe static char* EncodeSurrogate(char* pSrc, char* pSrcEnd, char* pDst)
777 {
778 /*
779An exception occurred when decompiling this method (06000177)
780
781ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Char* System.Xml.XmlEncodedRawTextWriter::EncodeSurrogate(System.Char*,System.Char*,System.Char*)
782
783 ---> System.Exception: Basic block has to end with unconditional control flow.
784{
785 Block_0:
786 stloc:int32(var_0_01, ldc.i4:int32(1))
787 stfld:char(char::m_value, ldloc:char*[exp:char&](pSrcEnd), ldloc:int32[exp:char](var_0_01))
788 stloc:Exception(var_1_10, call:Exception(XmlConvert::CreateInvalidSurrogatePairException, ldloc:char*[exp:char](pSrcEnd), ldloc:int32[exp:char](var_0_01)))
789 stloc:Exception(var_2_17, call:Exception(XmlConvert::CreateInvalidHighSurrogateCharException, ldloc:int32[exp:char](var_0_01)))
790 stloc:string(var_3_22, call:string(Res::GetString, ldstr:string("The surrogate pair is invalid. Missing a low surrogate character.")))
791}
792
793 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
794 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
795 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
796 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
797 --- End of inner exception stack trace ---
798 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
799 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
800*/;
801 }
802
803 // Token: 0x06000178 RID: 376 RVA: 0x00005D5C File Offset: 0x00003F5C
804 private unsafe char* InvalidXmlChar(int ch, char* pDst, bool entitize)
805 {
806 /*
807An exception occurred when decompiling this method (06000178)
808
809ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Char* System.Xml.XmlEncodedRawTextWriter::InvalidXmlChar(System.Int32,System.Char*,System.Boolean)
810
811 ---> System.Exception: Basic block has to end with unconditional control flow.
812{
813 IL_0012:
814 stloc:int64(var_0_13, ldc.i4:int64(0))
815 stloc:Exception(var_1_1B, call:Exception(XmlConvert::CreateInvalidCharException, ldloc:int32[exp:char](ch), ldloc:int64[exp:char](var_0_13)))
816}
817
818 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
819 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
820 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
821 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
822 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
823 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
824 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
825 --- End of inner exception stack trace ---
826 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
827 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
828*/;
829 }
830
831 // Token: 0x06000179 RID: 377 RVA: 0x00005D84 File Offset: 0x00003F84
832 internal unsafe void EncodeChar(char* pSrc, char* pSrcEnd, char* pDst)
833 {
834 char* ptr;
835 pDst->m_value = ptr;
836 }
837
838 // Token: 0x0600017A RID: 378 RVA: 0x00005DB8 File Offset: 0x00003FB8
839 protected void ChangeTextContentMark(bool value)
840 {
841 int[] array = this.textContentMarks;
842 int num = this.lastMarkPos;
844 int num2 = this.lastMarkPos;
845 int[] array2 = this.textContentMarks;
846 int num3 = this.bufPos;
848 }
849
850 // Token: 0x0600017B RID: 379 RVA: 0x00005DF8 File Offset: 0x00003FF8
851 private void GrowTextContentMarks()
852 {
853 int[] array = this.textContentMarks;
854 int[] array2 = this.textContentMarks;
855 }
856
857 // Token: 0x0600017C RID: 380 RVA: 0x00005E14 File Offset: 0x00004014
858 protected unsafe char* WriteNewLine(char* pDst)
859 {
860 /*
861An exception occurred when decompiling this method (0600017C)
862
863ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Char* System.Xml.XmlEncodedRawTextWriter::WriteNewLine(System.Char*)
864
865 ---> System.Exception: Basic block has to end with unconditional control flow.
866{
867 IL_000A:
868 stloc:string(var_1_10, ldfld:string(XmlEncodedRawTextWriter::newLineChars, ldloc:XmlEncodedRawTextWriter(this)))
869 stfld:int32(XmlEncodedRawTextWriter::bufPos, ldloc:XmlEncodedRawTextWriter(this), ldloc:char[][exp:int32](var_0_06))
870 call:void(XmlEncodedRawTextWriter::RawText, ldloc:XmlEncodedRawTextWriter(this), ldloc:string(var_1_10))
871}
872
873 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
874 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
875 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
876 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
877 --- End of inner exception stack trace ---
878 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
879 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
880*/;
881 }
882
883 // Token: 0x0600017D RID: 381 RVA: 0x00003FFD File Offset: 0x000021FD
884 protected unsafe static char* LtEntity(char* pDst)
885 {
886 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
887 }
888
889 // Token: 0x0600017E RID: 382 RVA: 0x00003FFD File Offset: 0x000021FD
890 protected unsafe static char* GtEntity(char* pDst)
891 {
892 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
893 }
894
895 // Token: 0x0600017F RID: 383 RVA: 0x00003FFD File Offset: 0x000021FD
896 protected unsafe static char* AmpEntity(char* pDst)
897 {
898 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
899 }
900
901 // Token: 0x06000180 RID: 384 RVA: 0x00003FFD File Offset: 0x000021FD
902 protected unsafe static char* QuoteEntity(char* pDst)
903 {
904 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
905 }
906
907 // Token: 0x06000181 RID: 385 RVA: 0x00003FFD File Offset: 0x000021FD
908 protected unsafe static char* TabEntity(char* pDst)
909 {
910 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
911 }
912
913 // Token: 0x06000182 RID: 386 RVA: 0x00003FFD File Offset: 0x000021FD
914 protected unsafe static char* LineFeedEntity(char* pDst)
915 {
916 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
917 }
918
919 // Token: 0x06000183 RID: 387 RVA: 0x00003FFD File Offset: 0x000021FD
920 protected unsafe static char* CarriageReturnEntity(char* pDst)
921 {
922 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
923 }
924
925 // Token: 0x06000184 RID: 388 RVA: 0x00005E40 File Offset: 0x00004040
926 private unsafe static char* CharEntity(char* pDst, char ch)
927 {
928 /*
929An exception occurred when decompiling this method (06000184)
930
931ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Char* System.Xml.XmlEncodedRawTextWriter::CharEntity(System.Char*,System.Char)
932
933 ---> System.Exception: Basic block has to end with unconditional control flow.
934{
935 IL_0018:
936 brtrue(IL_0018, ldloc:int32[exp:bool](var_3_0A))
937}
938
939 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
940 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
941 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
942 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
943 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
944 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
945 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
946 --- End of inner exception stack trace ---
947 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
948 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
949*/;
950 }
951
952 // Token: 0x06000185 RID: 389 RVA: 0x00003FFD File Offset: 0x000021FD
953 protected unsafe static char* RawStartCData(char* pDst)
954 {
955 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
956 }
957
958 // Token: 0x06000186 RID: 390 RVA: 0x00003FFD File Offset: 0x000021FD
959 protected unsafe static char* RawEndCData(char* pDst)
960 {
961 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
962 }
963
964 // Token: 0x06000187 RID: 391 RVA: 0x00005E68 File Offset: 0x00004068
965 protected void ValidateContentChars(string chars, string propertyName, bool allowOnlyWhitespace)
966 {
967 throw new ArrayTypeMismatchException();
968 }
969
970 // Token: 0x04000087 RID: 135
971 private readonly bool useAsync;
972
973 // Token: 0x04000088 RID: 136
974 protected byte[] bufBytes;
975
976 // Token: 0x04000089 RID: 137
977 protected Stream stream;
978
979 // Token: 0x0400008A RID: 138
981
982 // Token: 0x0400008B RID: 139
984
985 // Token: 0x0400008C RID: 140
986 protected int bufPos;
987
988 // Token: 0x0400008D RID: 141
989 protected int textPos;
990
991 // Token: 0x0400008E RID: 142
992 protected int contentPos;
993
994 // Token: 0x0400008F RID: 143
995 protected int cdataPos;
996
997 // Token: 0x04000090 RID: 144
998 protected int attrEndPos;
999
1000 // Token: 0x04000091 RID: 145
1001 protected int bufLen;
1002
1003 // Token: 0x04000092 RID: 146
1004 protected bool writeToNull;
1005
1006 // Token: 0x04000093 RID: 147
1007 protected bool hadDoubleBracket;
1008
1009 // Token: 0x04000094 RID: 148
1010 protected bool inAttributeValue;
1011
1012 // Token: 0x04000095 RID: 149
1013 protected int bufBytesUsed;
1014
1015 // Token: 0x04000096 RID: 150
1016 protected char[] bufChars;
1017
1018 // Token: 0x04000097 RID: 151
1019 protected Encoder encoder;
1020
1021 // Token: 0x04000098 RID: 152
1023
1024 // Token: 0x04000099 RID: 153
1025 protected bool trackTextContent;
1026
1027 // Token: 0x0400009A RID: 154
1028 protected bool inTextContent;
1029
1030 // Token: 0x0400009B RID: 155
1031 private int lastMarkPos;
1032
1033 // Token: 0x0400009C RID: 156
1034 private int[] textContentMarks;
1035
1036 // Token: 0x0400009D RID: 157
1038
1039 // Token: 0x0400009E RID: 158
1041
1042 // Token: 0x0400009F RID: 159
1043 protected bool closeOutput;
1044
1045 // Token: 0x040000A0 RID: 160
1046 protected bool omitXmlDeclaration;
1047
1048 // Token: 0x040000A1 RID: 161
1049 protected string newLineChars;
1050
1051 // Token: 0x040000A2 RID: 162
1052 protected bool checkCharacters;
1053
1054 // Token: 0x040000A3 RID: 163
1056
1057 // Token: 0x040000A4 RID: 164
1059
1060 // Token: 0x040000A5 RID: 165
1061 protected bool autoXmlDeclaration;
1062
1063 // Token: 0x040000A6 RID: 166
1064 protected bool mergeCDataSections;
1065 }
1066}
class f__AnonymousType0<< Count > j__TPar
CodePageDataItem dataItem
Definition Encoding.cs:1017
override void WriteXmlDeclaration(XmlStandalone standalone)
XmlEncodedRawTextWriter(XmlWriterSettings settings)
static unsafe char * AmpEntity(char *pDst)
static unsafe char * LtEntity(char *pDst)
override void WriteStartElement(string prefix, string localName, string ns)
override void WriteNamespaceDeclaration(string prefix, string namespaceName)
unsafe void EncodeChar(char *pSrc, char *pSrcEnd, char *pDst)
override void WriteProcessingInstruction(string name, string text)
unsafe void RawText(char *pSrcBegin, char *pSrcEnd)
override void WriteSurrogateCharEntity(char lowChar, char highChar)
override void WriteEndElement(string prefix, string localName, string ns)
override void WriteStartNamespaceDeclaration(string prefix)
override void WriteXmlDeclaration(string xmldecl)
override void WriteStartAttribute(string prefix, string localName, string ns)
unsafe char * InvalidXmlChar(int ch, char *pDst, bool entitize)
static unsafe char * GtEntity(char *pDst)
static unsafe char * QuoteEntity(char *pDst)
static unsafe char * LineFeedEntity(char *pDst)
unsafe void WriteElementTextBlock(char *pSrc, char *pSrcEnd)
XmlEncodedRawTextWriter(Stream stream, XmlWriterSettings settings)
static unsafe char * CharEntity(char *pDst, char ch)
unsafe void WriteAttributeTextBlock(char *pSrc, char *pSrcEnd)
static unsafe char * RawStartCData(char *pDst)
void WriteCommentOrPi(string text, int stopChar)
void ValidateContentChars(string chars, string propertyName, bool allowOnlyWhitespace)
unsafe void WriteRawWithCharChecking(char *pSrcBegin, char *pSrcEnd)
override void WriteChars(char[] buffer, int index, int count)
static unsafe char * RawEndCData(char *pDst)
void EncodeChars(int startOffset, int endOffset, bool writeAllToStream)
static unsafe char * TabEntity(char *pDst)
override void WriteRaw(char[] buffer, int index, int count)
override void WriteDocType(string name, string pubid, string sysid, string subset)
XmlEncodedRawTextWriter(TextWriter writer, XmlWriterSettings settings)
static unsafe char * CarriageReturnEntity(char *pDst)
override void WriteFullEndElement(string prefix, string localName, string ns)
static unsafe char * EncodeSurrogate(char *pSrc, char *pSrcEnd, char *pDst)
static XmlCharType Instance