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
FileSystemContentSource.cs
Go to the documentation of this file.
1using System;
3using System.IO;
5
7{
8 // Token: 0x02000B4D RID: 2893
10 {
11 // Token: 0x17000925 RID: 2341
12 // (get) Token: 0x0600541F RID: 21535 RVA: 0x00285698 File Offset: 0x00283898
13 // (set) Token: 0x06005420 RID: 21536 RVA: 0x002856AC File Offset: 0x002838AC
15 {
17 get
18 {
20 }
22 set
23 {
25 }
26 }
27
28 // Token: 0x17000926 RID: 2342
29 // (get) Token: 0x06005421 RID: 21537 RVA: 0x002856C0 File Offset: 0x002838C0
30 public int FileCount
31 {
32 get
33 {
34 /*
35An exception occurred when decompiling this method (06005421)
36
37ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 ReLogic.Content.Sources.FileSystemContentSource::get_FileCount()
38
39 ---> System.Exception: Basic block has to end with unconditional control flow.
40{
41 Block_0:
42 stloc:class [mscorlib]System.Collections.Generic.Dictionary`2<string, string>(var_0_06, ldfld:class [mscorlib]System.Collections.Generic.Dictionary`2<string, string>(FileSystemContentSource::_nameToAbsolutePath, ldloc:FileSystemContentSource(this)))
43}
44
45 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
46 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
47 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
48 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
49 --- End of inner exception stack trace ---
50 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
51 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
52*/;
53 }
54 }
55
56 // Token: 0x06005422 RID: 21538 RVA: 0x002856D4 File Offset: 0x002838D4
58 {
59 if (!true)
60 {
61 }
64 bool flag = fullPath.EndsWith("/");
65 bool flag2 = this._basePath.EndsWith("\\");
66 string basePath2 = this._basePath;
67 if ("\\" == null)
68 {
69 }
70 string text2;
71 string text = basePath2 + text2;
74 }
75
76 // Token: 0x06005423 RID: 21539 RVA: 0x0028573C File Offset: 0x0028393C
77 public bool HasAsset(string assetName)
78 {
79 /*
80An exception occurred when decompiling this method (06005423)
81
82ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean ReLogic.Content.Sources.FileSystemContentSource::HasAsset(System.String)
83
84 ---> System.Exception: Basic block has to end with unconditional control flow.
85{
86 Block_0:
87 stloc:bool(var_0_0C, call:bool(RejectedAssetCollection::IsRejected, ldfld:RejectedAssetCollection(FileSystemContentSource::_rejections, ldloc:FileSystemContentSource(this)), ldloc:string(assetName)))
88 stloc:class [mscorlib]System.Collections.Generic.Dictionary`2<string, string>(var_2_15, ldfld:class [mscorlib]System.Collections.Generic.Dictionary`2<string, string>(FileSystemContentSource::_nameToAbsolutePath, ldloc:FileSystemContentSource(this)))
89}
90
91 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
92 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
93 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
94 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
95 --- End of inner exception stack trace ---
96 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
97 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
98*/;
99 }
100
101 // Token: 0x06005424 RID: 21540 RVA: 0x00285760 File Offset: 0x00283960
107
108 // Token: 0x06005425 RID: 21541 RVA: 0x0028577C File Offset: 0x0028397C
110 {
111 /*
112An exception occurred when decompiling this method (06005425)
113
114ICSharpCode.Decompiler.DecompilerException: Error decompiling System.IO.Stream ReLogic.Content.Sources.FileSystemContentSource::OpenStream(System.String)
115
116 ---> System.Exception: Basic block has to end with unconditional control flow.
117{
118 Block_0:
119 stloc:class [mscorlib]System.Collections.Generic.Dictionary`2<string, string>(var_0_06, ldfld:class [mscorlib]System.Collections.Generic.Dictionary`2<string, string>(FileSystemContentSource::_nameToAbsolutePath, ldloc:FileSystemContentSource(this)))
120}
121
122 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
123 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
124 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
125 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
126 --- End of inner exception stack trace ---
127 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
128 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
129*/;
130 }
131
132 // Token: 0x06005426 RID: 21542 RVA: 0x00285794 File Offset: 0x00283994
134 {
135 bool flag = Directory.Exists(this._basePath);
136 string basePath = this._basePath;
137 int num = 1;
138 if ("*" == null)
139 {
140 }
141 string text;
143 int stringLength = this._basePath._stringLength;
144 int stringLength2 = text._stringLength;
145 string text2 = text.Substring(stringLength, num);
146 int num2 = 92;
147 int num3 = 47;
148 string text3 = text2.Replace((char)num2, (char)num3);
150 }
151
152 // Token: 0x06005427 RID: 21543 RVA: 0x00285808 File Offset: 0x00283A08
153 public void RejectAsset(string assetName, IRejectionReason reason)
154 {
155 this._rejections.Reject(assetName, reason);
156 }
157
158 // Token: 0x06005428 RID: 21544 RVA: 0x00285824 File Offset: 0x00283A24
159 public void ClearRejections()
160 {
161 this._rejections.Clear();
162 }
163
164 // Token: 0x06005429 RID: 21545 RVA: 0x0028583C File Offset: 0x00283A3C
166 {
167 return this._rejections.TryGetRejections(rejectionReasons);
168 }
169
170 // Token: 0x04008D14 RID: 36116
172 private IContentValidator <ContentValidator>k__BackingField;
173
174 // Token: 0x04008D15 RID: 36117
175 private readonly string _basePath;
176
177 // Token: 0x04008D16 RID: 36118
179
180 // Token: 0x04008D17 RID: 36119
182 }
183}
class f__AnonymousType0<< Count > j__TPar
void Reject(string assetPath, IRejectionReason reason)
bool TryGetRejections(List< string > rejectionReasons)
bool TryGetRejections(List< string > rejectionReasons)
readonly Dictionary< string, string > _nameToAbsolutePath
void RejectAsset(string assetName, IRejectionReason reason)
IContentValidator< ContentValidator > k__BackingField
static bool Exists(string path)
Definition Directory.cs:64
static string GetFullPath(string path)
Definition Path.cs:170
static string GetExtension(string path)
Definition Path.cs:128