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
XnaContentSource.cs
Go to the documentation of this file.
1using System;
3using System.IO;
7
9{
10 // Token: 0x02000B4F RID: 2895
12 {
13 // Token: 0x17000928 RID: 2344
14 // (get) Token: 0x06005432 RID: 21554 RVA: 0x00285858 File Offset: 0x00283A58
15 // (set) Token: 0x06005433 RID: 21555 RVA: 0x0028586C File Offset: 0x00283A6C
17 {
19 get
20 {
22 }
24 set
25 {
27 }
28 }
29
30 // Token: 0x06005434 RID: 21556 RVA: 0x00285880 File Offset: 0x00283A80
32 {
33 string text;
35 this.BuildFileMap();
36 }
37
38 // Token: 0x06005435 RID: 21557 RVA: 0x002858A0 File Offset: 0x00283AA0
39 private void BuildFileMap()
40 {
42 string rootDirectory = this._rootDirectory;
44 string[] array;
45 string text = array.ToLower();
46 }
47
48 // Token: 0x06005436 RID: 21558 RVA: 0x002858D0 File Offset: 0x00283AD0
49 public bool HasAsset(string assetName)
50 {
51 /*
52An exception occurred when decompiling this method (06005436)
53
54ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean ReLogic.Content.Sources.XnaContentSource::HasAsset(System.String)
55
56 ---> System.Exception: Basic block has to end with unconditional control flow.
57{
58 IL_000A:
59 stloc:string(var_1_1B, call:string(string::Concat, call:string(Path::Combine, ldloc:string(var_0_06), ldloc:string(assetName)), ldstr:string(".xnb")))
60 stloc:bool(var_2_28, call:bool(RejectedAssetCollection::IsRejected, ldfld:RejectedAssetCollection(XnaContentSource::_rejections, ldloc:XnaContentSource(this)), ldloc:string(assetName)))
61 stloc:class [System.Core]System.Collections.Generic.HashSet`1<string>(var_4_31, ldfld:class [System.Core]System.Collections.Generic.HashSet`1<string>(XnaContentSource::_files, ldloc:XnaContentSource(this)))
62 stloc:string(var_5_39, call:string(string::ToLower, ldloc:string(var_1_1B)))
63}
64
65 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
66 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
67 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
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 88
69 --- End of inner exception stack trace ---
70 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
71 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
72*/;
73 }
74
75 // Token: 0x06005437 RID: 21559 RVA: 0x00285918 File Offset: 0x00283B18
76 public string GetExtension(string assetName)
77 {
78 return ".xnb";
79 }
80
81 // Token: 0x06005438 RID: 21560 RVA: 0x0028592C File Offset: 0x00283B2C
83 {
84 int num = 1;
85 string rootDirectory = this._rootDirectory;
86 if (num == 0)
87 {
88 }
89 string text = Path.Combine(rootDirectory, assetName) + ".xnb";
91 }
92
93 // Token: 0x06005439 RID: 21561 RVA: 0x00285964 File Offset: 0x00283B64
94 public static string GetTitleLocationPath()
95 {
98 string text;
99 return text;
100 }
101
102 // Token: 0x0600543A RID: 21562 RVA: 0x00285984 File Offset: 0x00283B84
103 public void RejectAsset(string assetName, IRejectionReason reason)
104 {
105 this._rejections.Reject(assetName, reason);
106 }
107
108 // Token: 0x0600543B RID: 21563 RVA: 0x002859A0 File Offset: 0x00283BA0
109 public void ClearRejections()
110 {
111 this._rejections.Clear();
112 }
113
114 // Token: 0x0600543C RID: 21564 RVA: 0x002859B8 File Offset: 0x00283BB8
116 {
117 return this._rejections.TryGetRejections(rejectionReasons);
118 }
119
120 // Token: 0x04008D18 RID: 36120
121 private readonly string _rootDirectory;
122
123 // Token: 0x04008D19 RID: 36121
125
126 // Token: 0x04008D1A RID: 36122
128 private IContentValidator <ContentValidator>k__BackingField;
129
130 // Token: 0x04008D1B RID: 36123
132 }
133}
class f__AnonymousType0<< Count > j__TPar
static Stream OpenStream(string path)
void Reject(string assetPath, IRejectionReason reason)
bool TryGetRejections(List< string > rejectionReasons)
readonly RejectedAssetCollection _rejections
bool TryGetRejections(List< string > rejectionReasons)
IContentValidator< ContentValidator > k__BackingField
void RejectAsset(string assetName, IRejectionReason reason)
static string Combine(string path1, string path2)
Definition Path.cs:41
static Assembly GetCallingAssembly()
Definition Assembly.cs:319
static Assembly GetEntryAssembly()
Definition Assembly.cs:237