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
HtmlEncodedRawTextWriter.cs
Go to the documentation of this file.
1using System;
2using System.IO;
4using System.Text;
5
6namespace System.Xml
7{
8 // Token: 0x02000011 RID: 17
10 {
11 // Token: 0x0600002B RID: 43 RVA: 0x00002628 File Offset: 0x00000828
13 : base(writer, settings)
14 {
15 this.Init(settings);
16 }
17
18 // Token: 0x0600002C RID: 44 RVA: 0x00002644 File Offset: 0x00000844
20 : base(stream, settings)
21 {
22 this.Init(settings);
23 }
24
25 // Token: 0x0600002D RID: 45 RVA: 0x00002660 File Offset: 0x00000860
27 {
28 }
29
30 // Token: 0x0600002E RID: 46 RVA: 0x00002670 File Offset: 0x00000870
31 internal override void WriteXmlDeclaration(string xmldecl)
32 {
33 }
34
35 // Token: 0x0600002F RID: 47 RVA: 0x00002680 File Offset: 0x00000880
36 public override void WriteDocType(string name, string pubid, string sysid, string subset)
37 {
38 if (this.trackTextContent && this.inTextContent)
39 {
40 long num = 0L;
41 base.ChangeTextContentMark(num != 0L);
42 }
43 base.RawText("<!DOCTYPE ");
44 bool flag = name == "HTML";
45 if (pubid != null)
46 {
47 base.RawText(" PUBLIC \"");
48 base.RawText(pubid);
49 if (sysid != null)
50 {
51 return;
52 }
53 }
54 else
55 {
56 if (sysid == null)
57 {
58 int bufPos = this.bufPos;
59 char[] bufChars = this.bufChars;
60 return;
61 }
62 base.RawText(" SYSTEM \"");
63 base.RawText(sysid);
64 }
65 int bufPos2 = this.bufPos;
66 char[] bufChars2 = this.bufChars;
67 if (subset != null)
68 {
69 int num2 = 91;
71 base.RawText(subset);
72 char[] bufChars3 = this.bufChars;
74 }
76 }
77
78 // Token: 0x06000030 RID: 48 RVA: 0x00002744 File Offset: 0x00000944
79 public override void WriteStartElement(string prefix, string localName, string ns)
80 {
83 if (ns._stringLength != 0)
84 {
85 int num = 128;
87 base.WriteStartElement(prefix, localName, ns);
88 return;
89 }
90 if (this.trackTextContent && this.inTextContent)
91 {
92 long num2 = 0L;
93 base.ChangeTextContentMark(num2 != 0L);
94 }
95 char[] bufChars = this.bufChars;
96 base.RawText(localName);
97 int bufPos = this.bufPos;
99 }
100
101 // Token: 0x06000031 RID: 49 RVA: 0x000027B8 File Offset: 0x000009B8
102 internal override void StartElementContent()
103 {
104 char[] bufChars = this.bufChars;
106 }
107
108 // Token: 0x06000032 RID: 50 RVA: 0x000027DC File Offset: 0x000009DC
109 internal override void WriteEndElement(string prefix, string localName, string ns)
110 {
111 if (ns._stringLength != 0)
112 {
113 base.WriteEndElement(prefix, localName, ns);
114 return;
115 }
116 if (this.trackTextContent && this.inTextContent)
117 {
118 long num = 0L;
119 base.ChangeTextContentMark(num != 0L);
120 }
122 char[] bufChars = this.bufChars;
123 int num2 = 60;
124 int num3 = 47;
125 bufChars.m_value = (char)num2;
126 bufChars.m_value = (char)num3;
127 base.RawText(localName);
128 char[] bufChars2 = this.bufChars;
131 byte[] stack = byteStack.stack;
133 int size = byteStack.size;
134 }
135
136 // Token: 0x06000033 RID: 51 RVA: 0x00002884 File Offset: 0x00000A84
137 internal override void WriteFullEndElement(string prefix, string localName, string ns)
138 {
139 if (ns._stringLength != 0)
140 {
141 base.WriteFullEndElement(prefix, localName, ns);
142 return;
143 }
144 if (this.trackTextContent && this.inTextContent)
145 {
146 long num = 0L;
147 base.ChangeTextContentMark(num != 0L);
148 }
150 char[] bufChars = this.bufChars;
151 int num2 = 60;
152 int num3 = 47;
153 bufChars.m_value = (char)num2;
154 bufChars.m_value = (char)num3;
155 char[] bufChars2 = this.bufChars;
159 int size = byteStack.size;
160 }
161
162 // Token: 0x06000034 RID: 52 RVA: 0x00002918 File Offset: 0x00000B18
163 public override void WriteStartAttribute(string prefix, string localName, string ns)
164 {
165 if (ns._stringLength != 0)
166 {
167 base.WriteStartAttribute(prefix, localName, ns);
168 return;
169 }
170 if (this.trackTextContent && this.inTextContent)
171 {
172 long num = 0L;
173 base.ChangeTextContentMark(num != 0L);
174 }
175 int bufPos = this.bufPos;
176 char[] bufChars = this.bufChars;
177 int num2 = 32;
178 base.RawText(localName);
182 }
183
184 // Token: 0x06000035 RID: 53 RVA: 0x000029A0 File Offset: 0x00000BA0
185 public override void WriteEndAttribute()
186 {
188 if (this.endsWithAmpersand)
189 {
190 char[] bufChars = this.bufChars;
191 int num = 97;
192 int num2 = 109;
193 bufChars.m_value = (char)num;
194 int num3 = 112;
195 bufChars.m_value = (char)num2;
196 int num4 = 59;
197 bufChars.m_value = (char)num3;
198 bufChars.m_value = (char)num4;
199 }
200 bool inTextContent;
201 if (this.trackTextContent)
202 {
203 inTextContent = this.inTextContent;
204 if (inTextContent)
205 {
206 long num5 = 0L;
207 base.ChangeTextContentMark(num5 != 0L);
208 }
209 }
210 char[] bufChars2 = this.bufChars;
211 this.bufPos = (inTextContent ? 1 : 0);
212 }
213
214 // Token: 0x06000036 RID: 54 RVA: 0x00002A38 File Offset: 0x00000C38
215 public override void WriteProcessingInstruction(string target, string text)
216 {
217 if (this.trackTextContent && this.inTextContent)
218 {
219 long num = 0L;
220 base.ChangeTextContentMark(num != 0L);
221 }
222 char[] bufChars = this.bufChars;
223 int num2 = 60;
224 int num3 = 63;
225 bufChars.m_value = (char)num2;
226 bufChars.m_value = (char)num3;
227 base.RawText(target);
228 char[] bufChars2 = this.bufChars;
229 int num4 = 63;
231 base.WriteCommentOrPi(text, num4);
232 char[] bufChars3 = this.bufChars;
234 int bufLen = this.bufLen;
235 }
236
237 // Token: 0x06000037 RID: 55 RVA: 0x00002ABC File Offset: 0x00000CBC
238 public override void WriteString(string text)
239 {
240 if (!this.trackTextContent || this.inTextContent)
241 {
242 if (text != null)
243 {
245 return;
246 }
247 }
248 else
249 {
250 int num = 1;
251 base.ChangeTextContentMark(num != 0);
252 while (text != null)
253 {
254 }
255 }
256 if (this.inAttributeValue)
257 {
258 return;
259 }
260 }
261
262 // Token: 0x06000038 RID: 56 RVA: 0x00002AFC File Offset: 0x00000CFC
263 public override void WriteEntityRef(string name)
264 {
265 /*
266An exception occurred when decompiling this method (06000038)
267
268ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void System.Xml.HtmlEncodedRawTextWriter::WriteEntityRef(System.String)
269
270 ---> System.Exception: Basic block has to end with unconditional control flow.
271{
272 Block_0:
273 stloc:string(var_0_0A, call:string(Res::GetString, ldstr:string("Operation is not valid due to the current state of the object.")))
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: 0x06000039 RID: 57 RVA: 0x00002B14 File Offset: 0x00000D14
287 public override void WriteCharEntity(char ch)
288 {
289 /*
290An exception occurred when decompiling this method (06000039)
291
292ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void System.Xml.HtmlEncodedRawTextWriter::WriteCharEntity(System.Char)
293
294 ---> System.Exception: Basic block has to end with unconditional control flow.
295{
296 Block_0:
297 stloc:string(var_0_0A, call:string(Res::GetString, ldstr:string("Operation is not valid due to the current state of the object.")))
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.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
302 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
303 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
304 --- End of inner exception stack trace ---
305 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
306 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
307*/;
308 }
309
310 // Token: 0x0600003A RID: 58 RVA: 0x00002B2C File Offset: 0x00000D2C
311 public override void WriteSurrogateCharEntity(char lowChar, char highChar)
312 {
313 /*
314An exception occurred when decompiling this method (0600003A)
315
316ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void System.Xml.HtmlEncodedRawTextWriter::WriteSurrogateCharEntity(System.Char,System.Char)
317
318 ---> System.Exception: Basic block has to end with unconditional control flow.
319{
320 Block_0:
321 stloc:string(var_0_0A, call:string(Res::GetString, ldstr:string("Operation is not valid due to the current state of the object.")))
322}
323
324 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
325 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
326 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
327 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
328 --- End of inner exception stack trace ---
329 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
330 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
331*/;
332 }
333
334 // Token: 0x0600003B RID: 59 RVA: 0x00002B44 File Offset: 0x00000D44
335 public override void WriteChars(char[] buffer, int index, int count)
336 {
337 if (this.trackTextContent && !this.inTextContent)
338 {
339 int num = 1;
340 base.ChangeTextContentMark(num != 0);
341 }
342 if (this.inAttributeValue)
343 {
344 return;
345 }
346 }
347
348 // Token: 0x0600003C RID: 60 RVA: 0x00002B74 File Offset: 0x00000D74
349 private void Init(XmlWriterSettings settings)
350 {
351 string text = settings.mediaType;
353 bool flag = settings.doNotEscapeUriAttributes;
355 }
356
357 // Token: 0x0600003D RID: 61 RVA: 0x00002BA0 File Offset: 0x00000DA0
358 protected void WriteMetaElement()
359 {
360 base.RawText("<META http-equiv=\"Content-Type\"");
361 if (this.mediaType == null)
362 {
363 this.mediaType = "text/html";
364 }
365 base.RawText(" content=\"");
366 string text = this.mediaType;
367 base.RawText(text);
368 base.RawText("; charset=");
370 base.RawText("\">");
371 }
372
373 // Token: 0x0600003E RID: 62 RVA: 0x00002C04 File Offset: 0x00000E04
374 protected unsafe void WriteHtmlElementTextBlock(char* pSrc, char* pSrcEnd)
375 {
377 base.WriteElementTextBlock(pSrc, pSrcEnd);
378 }
379
380 // Token: 0x0600003F RID: 63 RVA: 0x00002C2C File Offset: 0x00000E2C
381 protected unsafe void WriteHtmlAttributeTextBlock(char* pSrc, char* pSrcEnd)
382 {
385 {
387 return;
388 }
389 this.WriteUriAttributeText(pSrc, pSrcEnd);
390 }
391
392 // Token: 0x06000040 RID: 64 RVA: 0x00002C74 File Offset: 0x00000E74
393 private unsafe void WriteHtmlAttributeText(char* pSrc, char* pSrcEnd)
394 {
395 if (this.endsWithAmpersand)
396 {
397 char[] bufChars = this.bufChars;
398 int num = 97;
399 int num2 = 109;
400 bufChars.m_value = (char)num;
401 int num3 = 112;
402 bufChars.m_value = (char)num2;
403 int num4 = 59;
404 bufChars.m_value = (char)num3;
405 bufChars.m_value = (char)num4;
406 }
407 char[] bufChars2 = this.bufChars;
408 if (bufChars2 != null)
409 {
410 return;
411 }
413 }
414
415 // Token: 0x06000041 RID: 65 RVA: 0x00002CF4 File Offset: 0x00000EF4
416 private unsafe void WriteUriAttributeText(char* pSrc, char* pSrcEnd)
417 {
418 if (this.endsWithAmpersand)
419 {
420 char[] bufChars = this.bufChars;
421 int num = 97;
422 int num2 = 109;
423 bufChars.m_value = (char)num;
424 int num3 = 112;
425 bufChars.m_value = (char)num2;
426 int num4 = 59;
427 bufChars.m_value = (char)num3;
428 bufChars.m_value = (char)num4;
429 }
430 char[] bufChars2 = this.bufChars;
431 if (bufChars2 != null)
432 {
433 return;
434 }
436 }
437
438 // Token: 0x06000042 RID: 66 RVA: 0x00002DB4 File Offset: 0x00000FB4
439 private void OutputRestAmps()
440 {
441 char[] bufChars = this.bufChars;
442 int num = 97;
443 int num2 = 109;
444 bufChars.m_value = (char)num;
445 int num3 = 112;
446 bufChars.m_value = (char)num2;
447 int num4 = 59;
448 bufChars.m_value = (char)num3;
449 bufChars.m_value = (char)num4;
450 }
451
452 // Token: 0x0400002E RID: 46
454
455 // Token: 0x0400002F RID: 47
457
458 // Token: 0x04000030 RID: 48
460
461 // Token: 0x04000031 RID: 49
462 private bool endsWithAmpersand;
463
464 // Token: 0x04000032 RID: 50
465 private byte[] uriEscapingBuffer;
466
467 // Token: 0x04000033 RID: 51
468 private string mediaType;
469
470 // Token: 0x04000034 RID: 52
472
473 // Token: 0x04000035 RID: 53
475
476 // Token: 0x04000036 RID: 54
478 }
479}
class f__AnonymousType0<< Count > j__TPar
override void WriteEndElement(string prefix, string localName, string ns)
override void WriteProcessingInstruction(string target, string text)
void Init(XmlWriterSettings settings)
unsafe void WriteHtmlElementTextBlock(char *pSrc, char *pSrcEnd)
static TernaryTreeReadOnly attributePropertySearch
override void WriteChars(char[] buffer, int index, int count)
override void WriteXmlDeclaration(string xmldecl)
unsafe void WriteHtmlAttributeTextBlock(char *pSrc, char *pSrcEnd)
override void WriteDocType(string name, string pubid, string sysid, string subset)
HtmlEncodedRawTextWriter(Stream stream, XmlWriterSettings settings)
override void WriteStartElement(string prefix, string localName, string ns)
HtmlEncodedRawTextWriter(TextWriter writer, XmlWriterSettings settings)
override void WriteXmlDeclaration(XmlStandalone standalone)
static TernaryTreeReadOnly elementPropertySearch
unsafe void WriteHtmlAttributeText(char *pSrc, char *pSrcEnd)
override void WriteStartAttribute(string prefix, string localName, string ns)
unsafe void WriteUriAttributeText(char *pSrc, char *pSrcEnd)
override void WriteSurrogateCharEntity(char lowChar, char highChar)
override void WriteFullEndElement(string prefix, string localName, string ns)