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
nativefiledialog.cs
Go to the documentation of this file.
1using System;
3using System.Text;
4
5// Token: 0x020002E3 RID: 739
6public static class nativefiledialog
7{
8 // Token: 0x06001112 RID: 4370 RVA: 0x00055300 File Offset: 0x00053500
9 private static int Utf8Size(string str)
10 {
11 return 1;
12 }
13
14 // Token: 0x06001113 RID: 4371 RVA: 0x00055310 File Offset: 0x00053510
15 private unsafe static byte* Utf8EncodeNullable(string str)
16 {
17 /*
18An exception occurred when decompiling this method (06001113)
19
20ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte* nativefiledialog::Utf8EncodeNullable(System.String)
21
22 ---> System.Exception: Basic block has to end with unconditional control flow.
23{
24 Block_0:
25 stloc:void*(var_0_0B, call:void*(native int::op_Explicit, call:native int(Marshal::AllocHGlobal, ldc.i4:int32(1))))
26 stloc:int32(var_2_13, callgetter:int32(RuntimeHelpers::get_OffsetToStringData))
27 stloc:Encoding(var_4_1B, callgetter:Encoding(Encoding::get_UTF8))
28}
29
30 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
31 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
32 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
33 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
34 --- End of inner exception stack trace ---
35 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
36 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
37*/;
38 }
39
40 // Token: 0x06001114 RID: 4372 RVA: 0x0005533C File Offset: 0x0005353C
41 private unsafe static string UTF8_ToManaged(IntPtr s, bool freePtr = false)
42 {
43 bool flag;
44 if ((void*)(flag ? 1 : 0) != null)
45 {
46 }
48 string text;
49 return text;
50 }
51
52 // Token: 0x06001115 RID: 4373
53 private static extern void free(IntPtr ptr);
54
55 // Token: 0x06001116 RID: 4374
57
58 // Token: 0x06001117 RID: 4375 RVA: 0x00055360 File Offset: 0x00053560
70
71 // Token: 0x06001118 RID: 4376
73
74 // Token: 0x06001119 RID: 4377 RVA: 0x0005538C File Offset: 0x0005358C
85
86 // Token: 0x0600111A RID: 4378
88
89 // Token: 0x0600111B RID: 4379 RVA: 0x000553B0 File Offset: 0x000535B0
101
102 // Token: 0x0600111C RID: 4380
104
105 // Token: 0x0600111D RID: 4381 RVA: 0x000553DC File Offset: 0x000535DC
114
115 // Token: 0x0600111E RID: 4382
116 private static extern IntPtr INTERNAL_NFD_GetError();
117
118 // Token: 0x0600111F RID: 4383 RVA: 0x000553F8 File Offset: 0x000535F8
119 public static string NFD_GetError()
120 {
122 long num = 0L;
123 return nativefiledialog.UTF8_ToManaged(intPtr, num != 0L);
124 }
125
126 // Token: 0x06001120 RID: 4384
128
129 // Token: 0x06001121 RID: 4385
131
132 // Token: 0x06001122 RID: 4386 RVA: 0x00055414 File Offset: 0x00053614
134 {
135 long num = 0L;
137 return nativefiledialog.UTF8_ToManaged(intPtr, num != 0L);
138 }
139
140 // Token: 0x06001123 RID: 4387
142
143 // Token: 0x040020E2 RID: 8418
144 private const string nativeLibName = "nfd";
145
146 // Token: 0x020002E4 RID: 740
147 public enum nfdresult_t
148 {
149 // Token: 0x040020E4 RID: 8420
150 NFD_ERROR,
151 // Token: 0x040020E5 RID: 8421
152 NFD_OKAY,
153 // Token: 0x040020E6 RID: 8422
155 }
156
157 // Token: 0x020002E5 RID: 741
158 public struct nfdpathset_t
159 {
160 // Token: 0x040020E7 RID: 8423
161 private IntPtr buf;
162
163 // Token: 0x040020E8 RID: 8424
165
166 // Token: 0x040020E9 RID: 8425
167 private IntPtr count;
168 }
169}
class f__AnonymousType0<< Count > j__TPar
static void FreeHGlobal(IntPtr hglobal)
Definition Marshal.cs:139
static Encoding UTF8
Definition Encoding.cs:828
static unsafe nativefiledialog.nfdresult_t NFD_SaveDialog(string filterList, string defaultPath, [Out] string outPath)
static unsafe nativefiledialog.nfdresult_t INTERNAL_NFD_OpenDialog(byte *filterList, byte *defaultPath, [Out] IntPtr outPath)
static unsafe nativefiledialog.nfdresult_t NFD_OpenDialog(string filterList, string defaultPath, [Out] string outPath)
const string nativeLibName
static void free(IntPtr ptr)
static void NFD_PathSet_Free(nativefiledialog.nfdpathset_t pathset)
static unsafe nativefiledialog.nfdresult_t NFD_OpenDialogMultiple(string filterList, string defaultPath, [Out] nativefiledialog.nfdpathset_t outPaths)
static IntPtr NFD_PathSet_GetCount(nativefiledialog.nfdpathset_t pathset)
static unsafe nativefiledialog.nfdresult_t INTERNAL_NFD_SaveDialog(byte *filterList, byte *defaultPath, [Out] IntPtr outPath)
static IntPtr INTERNAL_NFD_PathSet_GetPath(nativefiledialog.nfdpathset_t pathset, IntPtr index)
static unsafe string UTF8_ToManaged(IntPtr s, bool freePtr=false)
static string NFD_PathSet_GetPath(nativefiledialog.nfdpathset_t pathset, IntPtr index)
static unsafe nativefiledialog.nfdresult_t INTERNAL_NFD_OpenDialogMultiple(byte *filterList, byte *defaultPath, [Out] nativefiledialog.nfdpathset_t outPaths)
static nativefiledialog.nfdresult_t NFD_PickFolder(string defaultPath, [Out] string outPath)
static unsafe nativefiledialog.nfdresult_t INTERNAL_NFD_PickFolder(byte *defaultPath, [Out] IntPtr outPath)
static IntPtr INTERNAL_NFD_GetError()
static string NFD_GetError()
static unsafe byte * Utf8EncodeNullable(string str)
static int Utf8Size(string str)