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
JavaScriptUtils.cs
Go to the documentation of this file.
1using System;
2using System.IO;
4
6{
7 // Token: 0x0200006A RID: 106
9 internal static class JavaScriptUtils
10 {
11 // Token: 0x060003B9 RID: 953 RVA: 0x0000A7B0 File Offset: 0x000089B0
13 {
14 }
15
16 // Token: 0x060003BA RID: 954 RVA: 0x0000A914 File Offset: 0x00008B14
17 public static bool[] GetCharEscapeFlags(StringEscapeHandling stringEscapeHandling, char quoteChar)
18 {
19 /*
20An exception occurred when decompiling this method (060003BA)
21
22ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean[] Newtonsoft.Json.Utilities.JavaScriptUtils::GetCharEscapeFlags(Newtonsoft.Json.StringEscapeHandling,System.Char)
23
24 ---> System.Exception: Basic block has to end with unconditional control flow.
25{
26 IL_0005:
27 brtrue(IL_0000, ldloc:int32[exp:bool](var_0_01))
28}
29
30 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
31 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
32 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
33 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
34 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
35 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
36 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
37 --- End of inner exception stack trace ---
38 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
39 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
40*/;
41 }
42
43 // Token: 0x060003BB RID: 955 RVA: 0x0000A928 File Offset: 0x00008B28
44 public static bool ShouldEscapeJavaScriptString(string s, bool[] charEscapeFlags)
45 {
46 }
47
48 // Token: 0x060003BC RID: 956 RVA: 0x0000A93C File Offset: 0x00008B3C
49 public static void WriteEscapedJavaScriptString(TextWriter writer, string s, char delimiter, bool appendDelimiters, bool[] charEscapeFlags, StringEscapeHandling stringEscapeHandling, IArrayPool<char> bufferPool, char[] writeBuffer)
50 {
51 }
52
53 // Token: 0x060003BD RID: 957 RVA: 0x0000A9A8 File Offset: 0x00008BA8
55 {
56 if (!true)
57 {
58 }
59 int num = 16;
60 if (num == 0)
61 {
62 }
63 long num2 = 0L;
64 if (num != 0)
65 {
66 }
67 if (num2 == 0L)
68 {
69 }
70 throw new OutOfMemoryException();
71 }
72
73 // Token: 0x040001F3 RID: 499
74 internal static readonly bool[] SingleQuoteCharEscapeFlags;
75
76 // Token: 0x040001F4 RID: 500
77 internal static readonly bool[] DoubleQuoteCharEscapeFlags;
78
79 // Token: 0x040001F5 RID: 501
80 internal static readonly bool[] HtmlCharEscapeFlags;
81
82 // Token: 0x040001F6 RID: 502
83 private const int UnicodeTextLength = 6;
84
85 // Token: 0x040001F7 RID: 503
86 private const string EscapedUnicodeText = "!";
87 }
88}
class f__AnonymousType0<< Count > j__TPar
static readonly bool[] SingleQuoteCharEscapeFlags
static readonly bool[] DoubleQuoteCharEscapeFlags
static bool ShouldEscapeJavaScriptString(string s, bool[] charEscapeFlags)
static bool[] GetCharEscapeFlags(StringEscapeHandling stringEscapeHandling, char quoteChar)
static string ToEscapedJavaScriptString(string value, char delimiter, bool appendDelimiters, StringEscapeHandling stringEscapeHandling)
static void WriteEscapedJavaScriptString(TextWriter writer, string s, char delimiter, bool appendDelimiters, bool[] charEscapeFlags, StringEscapeHandling stringEscapeHandling, IArrayPool< char > bufferPool, char[] writeBuffer)