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
VanillaContentValidator.cs
Go to the documentation of this file.
1using System;
9
11{
12 // Token: 0x02000807 RID: 2055
14 {
15 // Token: 0x060041D3 RID: 16851 RVA: 0x00248B88 File Offset: 0x00246D88
17 {
18 int num = 1;
19 this._info = "\r\n|\r|\n";
20 base..ctor();
21 if (num == 0)
22 {
23 }
24 string text;
25 string[] array = Regex.Split(text, "\r\n|\r|\n");
26 bool flag = array.StartsWith("//");
27 int num2 = 9;
28 string[] array2;
29 bool flag2 = int.TryParse(array2, num2);
30 }
31
32 // Token: 0x060041D4 RID: 16852 RVA: 0x00248BE0 File Offset: 0x00246DE0
33 public bool AssetIsValid<T>(T content, string contentPath, [Out] IRejectionReason rejectReason) where T : class
34 {
35 if (content != null)
36 {
37 }
39 bool flag;
40 return flag;
41 }
42
43 // Token: 0x060041D5 RID: 16853 RVA: 0x00248BFC File Offset: 0x00246DFC
45 {
46 /*
47An exception occurred when decompiling this method (060041D5)
48
49ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.Generic.HashSet`1<System.String> Terraria.GameContent.VanillaContentValidator::GetValidImageFilePaths()
50
51 ---> System.Exception: Basic block has to end with unconditional control flow.
52{
53 IL_000A:
54 brtrue(IL_0000, ldc.i4:bool(1))
55}
56
57 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
58 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
59 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
60 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
61 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
62 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
63 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
64 --- End of inner exception stack trace ---
65 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
66 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
67*/;
68 }
69
70 // Token: 0x0400809A RID: 32922
72
73 // Token: 0x0400809B RID: 32923
75
76 // Token: 0x02000808 RID: 2056
77 private struct TextureMetaData
78 {
79 // Token: 0x060041D6 RID: 16854 RVA: 0x00248C18 File Offset: 0x00246E18
80 public bool Matches(Texture2D texture, [Out] IRejectionReason rejectReason)
81 {
82 int width = texture.Width;
83 int height = texture.Height;
84 int height2 = this.Height;
85 return true;
86 }
87
88 // Token: 0x0400809C RID: 32924
89 public int Width;
90
91 // Token: 0x0400809D RID: 32925
92 public int Height;
93 }
94
95 // Token: 0x02000809 RID: 2057
97 [Serializable]
98 private sealed class <>c
99 {
100 // Token: 0x060041D7 RID: 16855 RVA: 0x00248C40 File Offset: 0x00246E40
101 // Note: this type is marked as 'beforefieldinit'.
102 static <>c()
103 {
104 }
105
106 // Token: 0x060041D8 RID: 16856 RVA: 0x00248C50 File Offset: 0x00246E50
107 public <>c()
108 {
109 }
110
111 // Token: 0x060041D9 RID: 16857 RVA: 0x000021DB File Offset: 0x000003DB
113 {
114 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
115 }
116
117 // Token: 0x0400809E RID: 32926
118 public static readonly VanillaContentValidator.<>c <>9;
119
120 // Token: 0x0400809F RID: 32927
121 public static Func<KeyValuePair<string, VanillaContentValidator.TextureMetaData>, string> <>9__4_0;
122 }
123 }
124}
class f__AnonymousType0<< Count > j__TPar
static string[] Split(string input, string pattern)
Definition Regex.cs:366
Dictionary< string, VanillaContentValidator.TextureMetaData > _info
bool AssetIsValid< T >(T content, string contentPath, [Out] IRejectionReason rejectReason)
bool Matches(Texture2D texture, [Out] IRejectionReason rejectReason)