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
AssetRepository.cs
Go to the documentation of this file.
1using System;
7
8namespace ReLogic.Content
9{
10 // Token: 0x02000B42 RID: 2882
12 {
13 // Token: 0x17000915 RID: 2325
14 // (get) Token: 0x060053E6 RID: 21478 RVA: 0x00285180 File Offset: 0x00283380
15 public int PendingAssets
16 {
17 get
18 {
19 return this._queuedAssets._size;
20 }
21 }
22
23 // Token: 0x17000916 RID: 2326
24 // (get) Token: 0x060053E7 RID: 21479 RVA: 0x00285198 File Offset: 0x00283398
25 // (set) Token: 0x060053E8 RID: 21480 RVA: 0x002851AC File Offset: 0x002833AC
26 public int TotalAssets
27 {
29 get
30 {
31 return this.<TotalAssets>k__BackingField;
32 }
34 private set
35 {
37 }
38 }
39
40 // Token: 0x17000917 RID: 2327
41 // (get) Token: 0x060053E9 RID: 21481 RVA: 0x002851C0 File Offset: 0x002833C0
42 // (set) Token: 0x060053EA RID: 21482 RVA: 0x002851D4 File Offset: 0x002833D4
43 public int LoadedAssets
44 {
46 get
47 {
48 return this.<LoadedAssets>k__BackingField;
49 }
51 private set
52 {
54 }
55 }
56
57 // Token: 0x17000918 RID: 2328
58 // (get) Token: 0x060053EB RID: 21483 RVA: 0x002851E8 File Offset: 0x002833E8
60 {
61 get
62 {
63 return true;
64 }
65 }
66
67 // Token: 0x060053EC RID: 21484 RVA: 0x002851F8 File Offset: 0x002833F8
73
74 // Token: 0x060053ED RID: 21485 RVA: 0x0028521C File Offset: 0x0028341C
80
81 // Token: 0x060053EE RID: 21486 RVA: 0x00285240 File Offset: 0x00283440
82 public void ProcessAsyncLoad()
83 {
84 if (!true)
85 {
86 }
88 if (this._queuedAssets._size == 0)
89 {
90 }
93 bool flag = timeSpan < timeSpan2;
96 }
97
98 // Token: 0x060053EF RID: 21487 RVA: 0x002852B4 File Offset: 0x002834B4
100 {
101 this.ThrowIfDisposed();
102 object requestLock = this._requestLock;
104 int <Remaining>k__BackingField = asyncLoader.<Remaining>k__BackingField;
105 asyncLoader.TransferCompleted();
106 }
107
108 // Token: 0x060053F0 RID: 21488 RVA: 0x00285328 File Offset: 0x00283528
110 {
111 this.ThrowIfDisposed();
112 long num = 0L;
114 object requestLock = this._requestLock;
115 Monitor.Enter(requestLock, num != 0L);
118 long num2 = 0L;
120 if (num2 == 0L)
121 {
122 }
123 throw new OutOfMemoryException();
124 }
125
126 // Token: 0x060053F1 RID: 21489 RVA: 0x0028538C File Offset: 0x0028358C
128 {
129 this.ThrowIfDisposed();
130 object requestLock = this._requestLock;
132 long num = 0L;
134 if (num == 0L)
135 {
136 return;
137 }
138 throw new OutOfMemoryException();
139 }
140
141 // Token: 0x060053F2 RID: 21490 RVA: 0x002853E0 File Offset: 0x002835E0
146
147 // Token: 0x060053F3 RID: 21491 RVA: 0x00285430 File Offset: 0x00283630
148 private void LoadAsset<T>(Asset<T> asset, AssetRequestMode mode) where T : class
149 {
150 if (mode != AssetRequestMode.DoNotLoad)
151 {
152 int num = this.<TotalAssets>k__BackingField;
153 this.<TotalAssets>k__BackingField = num;
154 return;
155 }
156 }
157
158 // Token: 0x060053F4 RID: 21492 RVA: 0x000021DB File Offset: 0x000003DB
160 {
161 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
162 }
163
164 // Token: 0x060053F5 RID: 21493 RVA: 0x00285450 File Offset: 0x00283650
177
178 // Token: 0x060053F6 RID: 21494 RVA: 0x0028548C File Offset: 0x0028368C
183
184 // Token: 0x060053F7 RID: 21495 RVA: 0x002854A0 File Offset: 0x002836A0
186 {
187 if (asset != null)
188 {
189 }
190 }
191
192 // Token: 0x060053F8 RID: 21496 RVA: 0x002854B8 File Offset: 0x002836B8
194 {
195 /*
196An exception occurred when decompiling this method (060053F8)
197
198ICSharpCode.Decompiler.DecompilerException: Error decompiling ReLogic.Content.Sources.IContentSource ReLogic.Content.AssetRepository::FindSourceForAsset(System.String)
199
200 ---> System.Exception: Basic block has to end with unconditional control flow.
201{
202 IL_0000:
203 brtrue(IL_0000, logicnot:bool(ldfld:class [mscorlib]System.Collections.Generic.IEnumerable`1<class ReLogic.Content.Sources.IContentSource>[exp:bool](AssetRepository::_sources, ldloc:AssetRepository(this))))
204}
205
206 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
207 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
208 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
209 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
210 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
211 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
212 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
213 --- End of inner exception stack trace ---
214 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
215 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
216*/;
217 }
218
219 // Token: 0x060053F9 RID: 21497 RVA: 0x002854CC File Offset: 0x002836CC
220 private void ThrowIfDisposed()
221 {
222 while (this._isDisposed)
223 {
224 }
225 }
226
227 // Token: 0x060053FA RID: 21498 RVA: 0x002854E4 File Offset: 0x002836E4
228 protected virtual void Dispose(bool disposing)
229 {
230 if (!this._isDisposed)
231 {
233 return;
234 }
235 }
236
237 // Token: 0x060053FB RID: 21499 RVA: 0x00285528 File Offset: 0x00283728
238 public void Dispose()
239 {
240 }
241
242 // Token: 0x04008CF9 RID: 36089
244 private int <TotalAssets>k__BackingField;
245
246 // Token: 0x04008CFA RID: 36090
248 private int <LoadedAssets>k__BackingField;
249
250 // Token: 0x04008CFB RID: 36091
252
253 // Token: 0x04008CFC RID: 36092
255
256 // Token: 0x04008CFD RID: 36093
258
259 // Token: 0x04008CFE RID: 36094
261
262 // Token: 0x04008CFF RID: 36095
264
265 // Token: 0x04008D00 RID: 36096
267
268 // Token: 0x04008D01 RID: 36097
269 private readonly object _requestLock;
270
271 // Token: 0x04008D02 RID: 36098
272 private bool _isDisposed;
273
274 // Token: 0x02000B43 RID: 2883
276 [Serializable]
277 private sealed class <>c
278 {
279 // Token: 0x060053FC RID: 21500 RVA: 0x00285538 File Offset: 0x00283738
280 // Note: this type is marked as 'beforefieldinit'.
281 static <>c()
282 {
283 }
284
285 // Token: 0x060053FD RID: 21501 RVA: 0x00285548 File Offset: 0x00283748
286 public <>c()
287 {
288 }
289
290 // Token: 0x060053FE RID: 21502 RVA: 0x000021DB File Offset: 0x000003DB
292 {
293 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
294 }
295
296 // Token: 0x04008D03 RID: 36099
297 public static readonly AssetRepository.<>c <>9;
298
299 // Token: 0x04008D04 RID: 36100
300 public static Func<IAsset, bool> <>9__25_0;
301 }
302
303 // Token: 0x02000B44 RID: 2884
305 private sealed class <>c__DisplayClass31_0
306 {
307 // Token: 0x060053FF RID: 21503 RVA: 0x0028555C File Offset: 0x0028375C
309 {
310 }
311
312 // Token: 0x06005400 RID: 21504 RVA: 0x00285570 File Offset: 0x00283770
314 {
315 /*
316An exception occurred when decompiling this method (06005400)
317
318ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean ReLogic.Content.AssetRepository/<>c__DisplayClass31_0::<FindSourceForAsset>b__0(ReLogic.Content.Sources.IContentSource)
319
320 ---> System.Exception: Basic block has to end with unconditional control flow.
321{
322 Block_0:
323 stloc:string(var_0_06, ldfld:string('<>c__DisplayClass31_0'::assetName, ldloc:'<>c__DisplayClass31_0'(this)))
324}
325
326 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
327 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
328 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
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 88
330 --- End of inner exception stack trace ---
331 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
332 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
333*/;
334 }
335
336 // Token: 0x04008D05 RID: 36101
337 public string assetName;
338 }
339 }
340}
class f__AnonymousType0<< Count > j__TPar
static string CleanPath(string path)
AssetRepository(IAssetLoader syncLoader, AsyncAssetLoader asyncLoader, bool useAsync)
void TryLoadingAsset< T >(Asset< T > asset, AssetRequestMode mode)
void ReloadAssetsIfSourceChanged(AssetRequestMode mode)
readonly Dictionary< Type, Action< IAsset, AssetRequestMode > > _typeSpecificReloadActions
AssetRepository(IAssetLoader syncLoader, AsyncAssetLoader asyncLoader)
IEnumerable< IContentSource > _sources
void ForceReloadAsset< T >(IAsset asset, AssetRequestMode mode)
int< LoadedAssets > k__BackingField
readonly Dictionary< string, IAsset > _assets
IContentSource FindSourceForAsset(string assetName)
virtual void Dispose(bool disposing)
readonly AsyncAssetLoader _asyncLoader
void LoadAsset< T >(Asset< T > asset, AssetRequestMode mode)
void SetSources(IEnumerable< IContentSource > sources, AssetRequestMode mode=AssetRequestMode.ImmediateLoad)
void ForceReloadAsset(IAsset asset, AssetRequestMode mode)
Asset< T > Request< T >(string assetName, AssetRequestMode mode=AssetRequestMode.ImmediateLoad)
static void Exit(object obj)
Definition Monitor.cs:47
static void Enter(object obj)
Definition Monitor.cs:11
static DateTime Now
Definition DateTime.cs:530