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
XnaDirectContentSource.cs
Go to the documentation of this file.
1using System;
3using System.IO;
5
7{
8 // Token: 0x02000B50 RID: 2896
10 {
11 // Token: 0x17000929 RID: 2345
12 // (get) Token: 0x0600543D RID: 21565 RVA: 0x002859D4 File Offset: 0x00283BD4
13 // (set) Token: 0x0600543E RID: 21566 RVA: 0x002859E8 File Offset: 0x00283BE8
15 {
17 get
18 {
20 }
22 set
23 {
25 }
26 }
27
28 // Token: 0x0600543F RID: 21567 RVA: 0x002859FC File Offset: 0x00283BFC
30 {
31 string text;
33 this.BuildFileMap();
34 }
35
36 // Token: 0x06005440 RID: 21568 RVA: 0x00285A1C File Offset: 0x00283C1C
37 private void BuildFileMap()
38 {
40 string rootDirectory = this._rootDirectory;
42 string[] array;
43 string text = array.ToLower();
44 }
45
46 // Token: 0x06005441 RID: 21569 RVA: 0x00285A4C File Offset: 0x00283C4C
47 public bool HasAsset(string assetName)
48 {
49 /*
50An exception occurred when decompiling this method (06005441)
51
52ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean ReLogic.Content.Sources.XnaDirectContentSource::HasAsset(System.String)
53
54 ---> System.Exception: Basic block has to end with unconditional control flow.
55{
56 IL_000A:
57 stloc:string(var_1_1B, call:string(string::Concat, call:string(Path::Combine, ldloc:string(var_0_06), ldloc:string(assetName)), ldstr:string(".xnb")))
58 stloc:bool(var_2_28, call:bool(RejectedAssetCollection::IsRejected, ldfld:RejectedAssetCollection(XnaDirectContentSource::_rejections, ldloc:XnaDirectContentSource(this)), ldloc:string(assetName)))
59 stloc:class [System.Core]System.Collections.Generic.HashSet`1<string>(var_4_31, ldfld:class [System.Core]System.Collections.Generic.HashSet`1<string>(XnaDirectContentSource::_files, ldloc:XnaDirectContentSource(this)))
60 stloc:string(var_5_39, call:string(string::ToLower, ldloc:string(var_1_1B)))
61}
62
63 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
64 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
65 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
66 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
67 --- End of inner exception stack trace ---
68 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
69 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
70*/;
71 }
72
73 // Token: 0x06005442 RID: 21570 RVA: 0x00285A94 File Offset: 0x00283C94
74 public string GetExtension(string assetName)
75 {
76 return ".xnb";
77 }
78
79 // Token: 0x06005443 RID: 21571 RVA: 0x00285AA8 File Offset: 0x00283CA8
81 {
82 /*
83An exception occurred when decompiling this method (06005443)
84
85ICSharpCode.Decompiler.DecompilerException: Error decompiling System.IO.Stream ReLogic.Content.Sources.XnaDirectContentSource::OpenStream(System.String)
86
87 ---> System.Exception: Basic block has to end with unconditional control flow.
88{
89 IL_000C:
90 stloc:string(var_2_1D, call:string(string::Concat, call:string(Path::Combine, ldloc:string(var_1_08), ldloc:string(assetName)), ldstr:string(".xnb")))
91 stloc:FileStream(var_4_26, call:FileStream(File::OpenRead, ldloc:string(var_2_1D)))
92}
93
94 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
95 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
96 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
97 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
98 --- End of inner exception stack trace ---
99 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
100 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
101*/;
102 }
103
104 // Token: 0x06005444 RID: 21572 RVA: 0x00285AE0 File Offset: 0x00283CE0
105 public void RejectAsset(string assetName, IRejectionReason reason)
106 {
107 this._rejections.Reject(assetName, reason);
108 }
109
110 // Token: 0x06005445 RID: 21573 RVA: 0x00285AFC File Offset: 0x00283CFC
111 public void ClearRejections()
112 {
113 this._rejections.Clear();
114 }
115
116 // Token: 0x06005446 RID: 21574 RVA: 0x00285B14 File Offset: 0x00283D14
118 {
119 return this._rejections.TryGetRejections(rejectionReasons);
120 }
121
122 // Token: 0x04008D1C RID: 36124
123 private readonly string _rootDirectory;
124
125 // Token: 0x04008D1D RID: 36125
127
128 // Token: 0x04008D1E RID: 36126
130 private IContentValidator <ContentValidator>k__BackingField;
131
132 // Token: 0x04008D1F RID: 36127
134 }
135}
class f__AnonymousType0<< Count > j__TPar
void Reject(string assetPath, IRejectionReason reason)
bool TryGetRejections(List< string > rejectionReasons)
IContentValidator< ContentValidator > k__BackingField
bool TryGetRejections(List< string > rejectionReasons)
void RejectAsset(string assetName, IRejectionReason reason)