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
CSVReader.cs
Go to the documentation of this file.
1using System;
3using System.Text;
5using UnityEngine;
6
7// Token: 0x02000054 RID: 84
8public class CSVReader
9{
10 // Token: 0x060001C3 RID: 451 RVA: 0x000021DB File Offset: 0x000003DB
11 public static CSVReader Load(string file)
12 {
13 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
14 }
15
16 // Token: 0x060001C4 RID: 452 RVA: 0x000021DB File Offset: 0x000003DB
17 public static CSVReader LoadFromFile(string file)
18 {
19 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
20 }
21
22 // Token: 0x060001C5 RID: 453 RVA: 0x000021DB File Offset: 0x000003DB
23 public static CSVReader Load(byte[] fileData)
24 {
25 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
26 }
27
28 // Token: 0x060001C6 RID: 454 RVA: 0x00005420 File Offset: 0x00003620
29 public CSVReader()
30 {
31 }
32
33 // Token: 0x060001C7 RID: 455 RVA: 0x00005434 File Offset: 0x00003634
34 public void Begin(string file)
35 {
37 if (Resources.Load(file) != null)
38 {
39 }
40 }
41
42 // Token: 0x060001C8 RID: 456 RVA: 0x00005468 File Offset: 0x00003668
43 public void Begin(byte[] fileData)
44 {
45 this._fileData = fileData;
46 string[] array = this.ReadLine();
48 }
49
50 // Token: 0x060001C9 RID: 457 RVA: 0x0000548C File Offset: 0x0000368C
51 protected override void Finalize()
52 {
53 base.Finalize();
54 }
55
56 // Token: 0x060001CA RID: 458 RVA: 0x000054A0 File Offset: 0x000036A0
57 public string GetRawLine()
58 {
59 /*
60An exception occurred when decompiling this method (060001CA)
61
62ICSharpCode.Decompiler.DecompilerException: Error decompiling System.String CSVReader::GetRawLine()
63
64 ---> System.Exception: Basic block has to end with unconditional control flow.
65{
66 IL_0003:
67 stloc:uint8[](var_1_0B, ldfld:uint8[](CSVReader::_fileData, ldloc:CSVReader(this)))
68 stfld:int32(CSVReader::_fileOffset, ldloc:CSVReader(this), ldloc:uint8[][exp:int32](var_1_0B))
69 stloc:Encoding(var_3_1A, callgetter:Encoding(Encoding::get_UTF8))
70 stloc:uint8[](var_4_21, ldfld:uint8[](CSVReader::_fileData, ldloc:CSVReader(this)))
71}
72
73 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
74 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
75 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
76 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
77 --- End of inner exception stack trace ---
78 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
79 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
80*/;
81 }
82
83 // Token: 0x060001CB RID: 459 RVA: 0x000054D0 File Offset: 0x000036D0
84 public string[] ReadLine()
85 {
86 if (this._fileData != null)
87 {
88 int fileOffset = this._fileOffset;
89 string rawLine = this.GetRawLine();
90 string[] array = this.DecodeLine(rawLine);
91 int num = array.IndexOf("\"\"");
92 string text;
93 if (text == null || text != null)
94 {
95 return text;
96 }
97 }
99 }
100
101 // Token: 0x060001CC RID: 460 RVA: 0x000021DB File Offset: 0x000003DB
102 private string[] DecodeLine(string line)
103 {
104 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
105 }
106
107 // Token: 0x060001CD RID: 461 RVA: 0x00005520 File Offset: 0x00003720
108 // Note: this type is marked as 'beforefieldinit'.
109 static CSVReader()
110 {
111 }
112
113 // Token: 0x04000134 RID: 308
114 private static StringBuilder builder;
115
116 // Token: 0x04000135 RID: 309
117 private byte[] _fileData;
118
119 // Token: 0x04000136 RID: 310
120 private int _fileOffset;
121
122 // Token: 0x04000137 RID: 311
123 private string _filename;
124
125 // Token: 0x04000138 RID: 312
127
128 // Token: 0x04000139 RID: 313
129 public string[] Headers;
130}
class f__AnonymousType0<< Count > j__TPar
List< string > _tokens
Definition CSVReader.cs:126
void Begin(string file)
Definition CSVReader.cs:34
override void Finalize()
Definition CSVReader.cs:51
string[] ReadLine()
Definition CSVReader.cs:84
string[] DecodeLine(string line)
Definition CSVReader.cs:102
static StringBuilder builder
Definition CSVReader.cs:114
static CSVReader()
Definition CSVReader.cs:109
static CSVReader Load(string file)
Definition CSVReader.cs:11
byte[] _fileData
Definition CSVReader.cs:117
string GetRawLine()
Definition CSVReader.cs:57
static CSVReader LoadFromFile(string file)
Definition CSVReader.cs:17
string _filename
Definition CSVReader.cs:123
static CSVReader Load(byte[] fileData)
Definition CSVReader.cs:23
int _fileOffset
Definition CSVReader.cs:120
void Begin(byte[] fileData)
Definition CSVReader.cs:43
string[] Headers
Definition CSVReader.cs:129
static Object Load(string path)
Definition Resources.cs:20