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
ZipContentSource.cs
Go to the documentation of this file.
1using System;
3using System.IO;
6using Ionic.Zip;
7
9{
10 // Token: 0x02000B51 RID: 2897
12 {
13 // Token: 0x1700092A RID: 2346
14 // (get) Token: 0x06005447 RID: 21575 RVA: 0x00285B30 File Offset: 0x00283D30
15 public int EntryCount
16 {
17 get
18 {
19 /*
20An exception occurred when decompiling this method (06005447)
21
22ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 ReLogic.Content.Sources.ZipContentSource::get_EntryCount()
23
24 ---> System.Exception: Basic block has to end with unconditional control flow.
25{
26 Block_0:
27 stloc:class [mscorlib]System.Collections.Generic.Dictionary`2<string, class [Ionic.Zip.CF]Ionic.Zip.ZipEntry>(var_0_06, ldfld:class [mscorlib]System.Collections.Generic.Dictionary`2<string, class [Ionic.Zip.CF]Ionic.Zip.ZipEntry>(ZipContentSource::_entries, ldloc:ZipContentSource(this)))
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
41 // Token: 0x1700092B RID: 2347
42 // (get) Token: 0x06005448 RID: 21576 RVA: 0x00285B44 File Offset: 0x00283D44
43 // (set) Token: 0x06005449 RID: 21577 RVA: 0x00285B58 File Offset: 0x00283D58
45 {
47 get
48 {
50 }
52 set
53 {
55 }
56 }
57
58 // Token: 0x0600544A RID: 21578 RVA: 0x00285B6C File Offset: 0x00283D6C
59 public ZipContentSource(string path)
60 {
61 }
62
63 // Token: 0x0600544B RID: 21579 RVA: 0x00285B7C File Offset: 0x00283D7C
64 public ZipContentSource(string path, string contentDir)
65 {
66 if (!true)
67 {
68 }
75 }
76
77 // Token: 0x0600544C RID: 21580 RVA: 0x00285BBC File Offset: 0x00283DBC
78 public bool HasAsset(string assetName)
79 {
81 return this._rejections.IsRejected(assetName);
82 }
83
84 // Token: 0x0600544D RID: 21581 RVA: 0x00285BE0 File Offset: 0x00283DE0
85 public string GetExtension(string assetName)
86 {
89 }
90
91 // Token: 0x0600544E RID: 21582 RVA: 0x00285BFC File Offset: 0x00283DFC
93 {
94 /*
95An exception occurred when decompiling this method (0600544E)
96
97ICSharpCode.Decompiler.DecompilerException: Error decompiling System.IO.Stream ReLogic.Content.Sources.ZipContentSource::OpenStream(System.String)
98
99 ---> System.Exception: Basic block has to end with unconditional control flow.
100{
101 Block_0:
102 stloc:class [mscorlib]System.Collections.Generic.Dictionary`2<string, class [Ionic.Zip.CF]Ionic.Zip.ZipEntry>(var_0_06, ldfld:class [mscorlib]System.Collections.Generic.Dictionary`2<string, class [Ionic.Zip.CF]Ionic.Zip.ZipEntry>(ZipContentSource::_entries, ldloc:ZipContentSource(this)))
103}
104
105 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
106 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
107 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
108 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
109 --- End of inner exception stack trace ---
110 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
111 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
112*/;
113 }
114
115 // Token: 0x0600544F RID: 21583 RVA: 0x00285C10 File Offset: 0x00283E10
121
122 // Token: 0x06005450 RID: 21584 RVA: 0x00285CA0 File Offset: 0x00283EA0
123 private static bool ZipPathContainsInvalidCharacters(string path)
124 {
125 return true;
126 }
127
128 // Token: 0x06005451 RID: 21585 RVA: 0x00285CB0 File Offset: 0x00283EB0
129 private static string CleanZipPath(string path)
130 {
131 string text2;
132 string text = Regex.Replace(text2, "^[./]+", "");
133 if (text._stringLength != 0)
134 {
135 bool flag = text.EndsWith("/");
136 }
137 return text;
138 }
139
140 // Token: 0x06005452 RID: 21586 RVA: 0x00285CF0 File Offset: 0x00283EF0
141 protected virtual void Dispose(bool disposing)
142 {
143 if (!this._isDisposed)
144 {
146 this._zipFile.Dispose();
147 this._isDisposed = true;
148 }
149 }
150
151 // Token: 0x06005453 RID: 21587 RVA: 0x00285D20 File Offset: 0x00283F20
152 public void Dispose()
153 {
154 }
155
156 // Token: 0x06005454 RID: 21588 RVA: 0x00285D30 File Offset: 0x00283F30
157 public void RejectAsset(string assetName, IRejectionReason reason)
158 {
159 this._rejections.Reject(assetName, reason);
160 }
161
162 // Token: 0x06005455 RID: 21589 RVA: 0x00285D4C File Offset: 0x00283F4C
163 public void ClearRejections()
164 {
165 this._rejections.Clear();
166 }
167
168 // Token: 0x06005456 RID: 21590 RVA: 0x00285D64 File Offset: 0x00283F64
170 {
171 return this._rejections.TryGetRejections(rejectionReasons);
172 }
173
174 // Token: 0x06005457 RID: 21591 RVA: 0x00285D80 File Offset: 0x00283F80
177 {
178 if (entry._IsDirectory)
179 {
180 }
182 bool flag;
183 return flag;
184 }
185
186 // Token: 0x04008D20 RID: 36128
188 private IContentValidator <ContentValidator>k__BackingField;
189
190 // Token: 0x04008D21 RID: 36129
192
193 // Token: 0x04008D22 RID: 36130
195
196 // Token: 0x04008D23 RID: 36131
197 private readonly string _basePath;
198
199 // Token: 0x04008D24 RID: 36132
200 private bool _isDisposed;
201
202 // Token: 0x04008D25 RID: 36133
204 }
205}
class f__AnonymousType0<< Count > j__TPar
string _FileNameInArchive
Definition ZipEntry.cs:2357
static ZipFile Read(string fileName)
Definition ZipFile.cs:2156
ICollection< ZipEntry > Entries
Definition ZipFile.cs:1493
void Reject(string assetPath, IRejectionReason reason)
bool TryGetRejections(List< string > rejectionReasons)
readonly Dictionary< string, ZipEntry > _entries
readonly RejectedAssetCollection _rejections
bool TryGetRejections(List< string > rejectionReasons)
void RejectAsset(string assetName, IRejectionReason reason)
IContentValidator< ContentValidator > k__BackingField
ZipContentSource(string path, string contentDir)
bool< BuildExtensionFreeEntryList > b__14_0(ZipEntry entry)
static bool ZipPathContainsInvalidCharacters(string path)
static string GetExtension(string path)
Definition Path.cs:128
static string Replace(string input, string pattern, string replacement)
Definition Regex.cs:269