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
CloudSocialModule.cs
Go to the documentation of this file.
1using System;
3using System.IO;
6
8{
9 // Token: 0x02000514 RID: 1300
11 {
12 // Token: 0x0600315B RID: 12635 RVA: 0x001F8048 File Offset: 0x001F6248
13 public override void Initialize()
14 {
15 base.Initialize();
16 }
17
18 // Token: 0x0600315C RID: 12636 RVA: 0x001F805C File Offset: 0x001F625C
19 public override void Shutdown()
20 {
21 }
22
23 // Token: 0x0600315D RID: 12637 RVA: 0x001F806C File Offset: 0x001F626C
24 public void SyncFiles(string path)
25 {
26 string text = this.cacheFolder;
27 this.SyncPath = path;
28 string text2 = text + path;
29 }
30
31 // Token: 0x0600315E RID: 12638 RVA: 0x001F8090 File Offset: 0x001F6290
32 public bool HasFinishedSync()
33 {
34 }
35
36 // Token: 0x0600315F RID: 12639 RVA: 0x001F80A0 File Offset: 0x001F62A0
37 public bool IsRequired()
38 {
39 }
40
41 // Token: 0x06003160 RID: 12640 RVA: 0x001F80B0 File Offset: 0x001F62B0
42 public bool IsAvailable()
43 {
44 }
45
46 // Token: 0x06003161 RID: 12641 RVA: 0x001F80C0 File Offset: 0x001F62C0
47 public bool IsConnected()
48 {
49 }
50
51 // Token: 0x06003162 RID: 12642 RVA: 0x001F80D0 File Offset: 0x001F62D0
52 public override IEnumerable<string> GetFiles()
53 {
54 /*
55An exception occurred when decompiling this method (06003162)
56
57ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.Generic.IEnumerable`1<System.String> Terraria.Social.iOS.CloudSocialModule::GetFiles()
58
59 ---> System.Exception: Basic block has to end with unconditional control flow.
60{
61 Block_0:
62 stloc:string(var_0_06, ldfld:string(CloudSocialModule::cacheFolder, ldloc:CloudSocialModule(this)))
63 stloc:DirectoryInfo(var_1_0D, call:DirectoryInfo(Directory::CreateDirectory, ldloc:string(var_0_06)))
64 stloc:string[](var_2_19, call:string[](Directory::GetFiles, ldloc:string(var_0_06), ldstr:string("*.*")))
65 stloc:int32(var_4_27, ldfld:int32(string::_stringLength, ldfld:string(CloudSocialModule::cacheFolder, ldloc:CloudSocialModule(this))))
66}
67
68 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
69 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
70 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
71 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
72 --- End of inner exception stack trace ---
73 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
74 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
75*/;
76 }
77
78 // Token: 0x06003163 RID: 12643 RVA: 0x001F8108 File Offset: 0x001F6308
79 public static string GetParentFolderPath(string path, bool includeExtension = true)
80 {
81 if (!true)
82 {
83 }
85 Group group;
86 if (match != null && group != null)
87 {
89 return group2.Value;
90 }
91 return "";
92 }
93
94 // Token: 0x06003164 RID: 12644 RVA: 0x001F812C File Offset: 0x001F632C
95 public override bool Write(string path, byte[] data, int length)
96 {
97 string text = this.cacheFolder + path;
98 long num = 0L;
100 bool flag = parentFolderPath != "";
102 return true;
103 }
104
105 // Token: 0x06003165 RID: 12645 RVA: 0x001F8168 File Offset: 0x001F6368
106 public override void Read(string path, byte[] buffer, int length)
107 {
108 string text = this.cacheFolder + path;
109 string text2 = this.cacheFolder;
110 long num = 0L;
111 Array.Copy(File.ReadAllBytes(text2 + path), buffer, (int)num);
112 }
113
114 // Token: 0x06003166 RID: 12646 RVA: 0x001F81A0 File Offset: 0x001F63A0
115 public override bool HasFile(string path)
116 {
117 return File.Exists(this.cacheFolder + path);
118 }
119
120 // Token: 0x06003167 RID: 12647 RVA: 0x001F81C0 File Offset: 0x001F63C0
121 public override int GetFileSize(string path)
122 {
123 /*
124An exception occurred when decompiling this method (06003167)
125
126ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.Social.iOS.CloudSocialModule::GetFileSize(System.String)
127
128 ---> System.Exception: Basic block has to end with unconditional control flow.
129{
130 Block_0:
131 stloc:uint8[](var_0_11, call:uint8[](File::ReadAllBytes, call:string(string::Concat, ldfld:string(CloudSocialModule::cacheFolder, ldloc:CloudSocialModule(this)), ldloc:string(path))))
132}
133
134 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
135 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
136 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
137 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
138 --- End of inner exception stack trace ---
139 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
140 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
141*/;
142 }
143
144 // Token: 0x06003168 RID: 12648 RVA: 0x001F81E0 File Offset: 0x001F63E0
145 public override bool Delete(string path)
146 {
147 File.Delete(this.cacheFolder + path);
148 return true;
149 }
150
151 // Token: 0x06003169 RID: 12649 RVA: 0x001F8200 File Offset: 0x001F6400
152 public override bool Forget(string path)
153 {
154 return true;
155 }
156
157 // Token: 0x0600316A RID: 12650 RVA: 0x001F8210 File Offset: 0x001F6410
159 {
160 if (!true)
161 {
162 }
163 string text = Main.SavePath + "/RemoteCloudCache/";
165 string text2 = Main.SavePath + "/CloudCache/";
166 this.cacheFolder = text2;
167 base..ctor();
168 }
169
170 // Token: 0x0600316B RID: 12651 RVA: 0x001F8258 File Offset: 0x001F6458
171 // Note: this type is marked as 'beforefieldinit'.
173 {
174 }
175
176 // Token: 0x04003B18 RID: 15128
177 private string editorRemoteCache;
178
179 // Token: 0x04003B19 RID: 15129
180 private string cacheFolder;
181
182 // Token: 0x04003B1A RID: 15130
183 private static Regex FileNameRegex;
184
185 // Token: 0x04003B1B RID: 15131
186 private string SyncPath;
187
188 // Token: 0x04003B1C RID: 15132
190 }
191}
class f__AnonymousType0<< Count > j__TPar
static void Copy(Array sourceArray, Array destinationArray, long length)
Definition Array.cs:205
static DirectoryInfo CreateDirectory(string path)
Definition Directory.cs:40
static bool Exists(string path)
Definition File.cs:86
static byte[] ReadAllBytes(string path)
Definition File.cs:165
static void Delete(string path)
Definition File.cs:77
static string GetParentFolderPath(string path, bool includeExtension=true)
override bool Write(string path, byte[] data, int length)
override void Read(string path, byte[] buffer, int length)
override IEnumerable< string > GetFiles()