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
FavoritesFile.cs
Go to the documentation of this file.
1using System;
3using System.Text;
4
5namespace Terraria.IO
6{
7 // Token: 0x0200055D RID: 1373
8 public class FavoritesFile
9 {
10 // Token: 0x06003360 RID: 13152 RVA: 0x001FF428 File Offset: 0x001FD628
11 public FavoritesFile(string path, bool isCloud)
12 {
13 this.Path = path;
14 }
15
16 // Token: 0x06003361 RID: 13153 RVA: 0x001FF444 File Offset: 0x001FD644
17 public void SaveFavorite(FileData fileData)
18 {
20 string type = fileData.Type;
22 string type2 = fileData.Type;
24 string type3 = fileData.Type;
25 string fileName = fileData.GetFileName(true);
26 bool isFavorite = fileData._isFavorite;
27 this.Save();
28 }
29
30 // Token: 0x06003362 RID: 13154 RVA: 0x001FF494 File Offset: 0x001FD694
31 public void ClearEntry(FileData fileData)
32 {
34 string type = fileData.Type;
36 string type2 = fileData.Type;
37 string fileName = fileData.GetFileName(true);
38 this.Save();
39 }
40
41 // Token: 0x06003363 RID: 13155 RVA: 0x001FF4D0 File Offset: 0x001FD6D0
42 public bool IsFavorite(FileData fileData)
43 {
44 /*
45An exception occurred when decompiling this method (06003363)
46
47ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.IO.FavoritesFile::IsFavorite(Terraria.IO.FileData)
48
49 ---> System.Exception: Basic block has to end with unconditional control flow.
50{
51 Block_0:
52 stloc:class [mscorlib]System.Collections.Generic.Dictionary`2<string, class [mscorlib]System.Collections.Generic.Dictionary`2<string, bool>>(var_0_06, ldfld:class [mscorlib]System.Collections.Generic.Dictionary`2<string, class [mscorlib]System.Collections.Generic.Dictionary`2<string, bool>>(FavoritesFile::_data, ldloc:FavoritesFile(this)))
53 stloc:string(var_1_0D, ldfld:string(FileData::Type, ldloc:FileData(fileData)))
54 stloc:string(var_2_15, call:string(FileData::GetFileName, ldloc:FileData(fileData), ldc.i4:bool(1)))
55 stloc:class [mscorlib]System.Collections.Generic.Dictionary`2<string, class [mscorlib]System.Collections.Generic.Dictionary`2<string, bool>>(var_3_1C, ldfld:class [mscorlib]System.Collections.Generic.Dictionary`2<string, class [mscorlib]System.Collections.Generic.Dictionary`2<string, bool>>(FavoritesFile::_data, ldloc:FavoritesFile(this)))
56 stloc:string(var_4_23, ldfld:string(FileData::Type, ldloc:FileData(fileData)))
57}
58
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 1852
60 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
61 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
62 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
63 --- End of inner exception stack trace ---
64 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
65 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
66*/;
67 }
68
69 // Token: 0x06003364 RID: 13156 RVA: 0x001FF504 File Offset: 0x001FD704
70 public void Save()
71 {
72 int num = 1;
74 if (num == 0)
75 {
76 }
78 string path = this.Path;
79 bool isCloudSave = this.IsCloudSave;
80 }
81
82 // Token: 0x06003365 RID: 13157 RVA: 0x001FF544 File Offset: 0x001FD744
83 public void Load()
84 {
85 int num = 1;
86 string path = this.Path;
87 bool isCloudSave = this.IsCloudSave;
88 if (num == 0)
89 {
90 }
91 string path2 = this.Path;
92 bool isCloudSave2 = this.IsCloudSave;
93 if (num == 0)
94 {
95 }
98 if (utf == null)
99 {
100 }
101 }
102
103 // Token: 0x04003C32 RID: 15410
104 public readonly string Path;
105
106 // Token: 0x04003C33 RID: 15411
108
109 // Token: 0x04003C34 RID: 15412
111 }
112}
class f__AnonymousType0<< Count > j__TPar
static Encoding UTF8
Definition Encoding.cs:828
Dictionary< string, Dictionary< string, bool > > _data
FavoritesFile(string path, bool isCloud)
void SaveFavorite(FileData fileData)
bool IsFavorite(FileData fileData)
void ClearEntry(FileData fileData)
string GetFileName(bool includeExtension=true)
Definition FileData.cs:70
readonly string Type
Definition FileData.cs:121