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
WebReadStream.cs
Go to the documentation of this file.
1using System;
3using System.IO;
9
10namespace System.Net
11{
12 // Token: 0x0200028D RID: 653
13 internal abstract class WebReadStream : Stream
14 {
15 // Token: 0x17000429 RID: 1065
16 // (get) Token: 0x06001213 RID: 4627 RVA: 0x000382D4 File Offset: 0x000364D4
18 {
20 get
21 {
22 return this.<Operation>k__BackingField;
23 }
24 }
25
26 // Token: 0x1700042A RID: 1066
27 // (get) Token: 0x06001214 RID: 4628 RVA: 0x000382E8 File Offset: 0x000364E8
29 {
31 get
32 {
33 return this.<InnerStream>k__BackingField;
34 }
35 }
36
37 // Token: 0x1700042B RID: 1067
38 // (get) Token: 0x06001215 RID: 4629 RVA: 0x000382FC File Offset: 0x000364FC
39 internal string ME
40 {
41 get
42 {
43 }
44 }
45
46 // Token: 0x06001216 RID: 4630 RVA: 0x0003830C File Offset: 0x0003650C
47 public WebReadStream(WebOperation operation, Stream innerStream)
48 {
49 if (!true)
50 {
51 }
52 base..ctor();
53 this.Operation = operation;
54 this.InnerStream = innerStream;
55 }
56
57 // Token: 0x1700042C RID: 1068
58 // (get) Token: 0x06001217 RID: 4631 RVA: 0x00002050 File Offset: 0x00000250
59 public override long Length
60 {
61 get
62 {
63 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
64 }
65 }
66
67 // Token: 0x1700042D RID: 1069
68 // (get) Token: 0x06001218 RID: 4632 RVA: 0x00002050 File Offset: 0x00000250
69 // (set) Token: 0x06001219 RID: 4633 RVA: 0x00002050 File Offset: 0x00000250
70 public override long Position
71 {
72 get
73 {
74 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
75 }
76 set
77 {
78 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
79 }
80 }
81
82 // Token: 0x1700042E RID: 1070
83 // (get) Token: 0x0600121A RID: 4634 RVA: 0x00038330 File Offset: 0x00036530
84 public override bool CanSeek
85 {
86 get
87 {
88 }
89 }
90
91 // Token: 0x1700042F RID: 1071
92 // (get) Token: 0x0600121B RID: 4635 RVA: 0x00038340 File Offset: 0x00036540
93 public override bool CanRead
94 {
95 get
96 {
97 return true;
98 }
99 }
100
101 // Token: 0x17000430 RID: 1072
102 // (get) Token: 0x0600121C RID: 4636 RVA: 0x00038350 File Offset: 0x00036550
103 public override bool CanWrite
104 {
105 get
106 {
107 }
108 }
109
110 // Token: 0x0600121D RID: 4637 RVA: 0x00002050 File Offset: 0x00000250
111 public override void SetLength(long value)
112 {
113 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
114 }
115
116 // Token: 0x0600121E RID: 4638 RVA: 0x00002050 File Offset: 0x00000250
117 public override long Seek(long offset, SeekOrigin origin)
118 {
119 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
120 }
121
122 // Token: 0x0600121F RID: 4639 RVA: 0x00002050 File Offset: 0x00000250
123 public override void Write(byte[] buffer, int offset, int count)
124 {
125 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
126 }
127
128 // Token: 0x06001220 RID: 4640 RVA: 0x00002050 File Offset: 0x00000250
129 public override void Flush()
130 {
131 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
132 }
133
134 // Token: 0x06001221 RID: 4641 RVA: 0x00038360 File Offset: 0x00036560
136 {
137 if (!true)
138 {
139 }
141 if (ex != null)
142 {
143 }
144 bool aborted = this.<Operation>k__BackingField.Aborted;
146 if (ex != null)
147 {
148 }
149 return ex;
150 }
151
152 // Token: 0x06001222 RID: 4642 RVA: 0x00038394 File Offset: 0x00036594
153 public override int Read(byte[] buffer, int offset, int size)
154 {
156 if (buffer != null)
157 {
159 return "offset";
160 }
161 }
162
163 // Token: 0x06001223 RID: 4643 RVA: 0x000383C0 File Offset: 0x000365C0
164 public override IAsyncResult BeginRead(byte[] buffer, int offset, int size, AsyncCallback cb, object state)
165 {
166 do
167 {
169 }
170 while (buffer == null);
172 IAsyncResult asyncResult;
173 return asyncResult;
174 }
175
176 // Token: 0x06001224 RID: 4644 RVA: 0x000383EC File Offset: 0x000365EC
177 public override int EndRead(IAsyncResult r)
178 {
179 if (r != null)
180 {
181 return TaskToApm.End<int>(r);
182 }
183 }
184
185 // Token: 0x06001225 RID: 4645 RVA: 0x00038404 File Offset: 0x00036604
186 public sealed override Task<int> ReadAsync(byte[] buffer, int offset, int size, CancellationToken cancellationToken)
187 {
188 /*
189An exception occurred when decompiling this method (06001225)
190
191ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Threading.Tasks.Task`1<System.Int32> System.Net.WebReadStream::ReadAsync(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)
192
193 ---> System.Exception: Basic block has to end with unconditional control flow.
194{
195 IL_0000:
196 brtrue(IL_0000, ldc.i4:bool(1))
197}
198
199 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
200 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
201 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
202 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
203 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
204 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
205 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
206 --- End of inner exception stack trace ---
207 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
208 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
209*/;
210 }
211
212 // Token: 0x06001226 RID: 4646
213 protected abstract Task<int> ProcessReadAsync(byte[] buffer, int offset, int size, CancellationToken cancellationToken);
214
215 // Token: 0x06001227 RID: 4647 RVA: 0x00038414 File Offset: 0x00036614
216 internal virtual Task FinishReading(CancellationToken cancellationToken)
217 {
218 /*
219An exception occurred when decompiling this method (06001227)
220
221ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Threading.Tasks.Task System.Net.WebReadStream::FinishReading(System.Threading.CancellationToken)
222
223 ---> System.Exception: Basic block has to end with unconditional control flow.
224{
225 IL_0014:
226 brtrue(IL_0000, ldc.i4:bool(1))
227}
228
229 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
230 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
231 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
232 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
233 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
234 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
235 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
236 --- End of inner exception stack trace ---
237 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
238 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
239*/;
240 }
241
242 // Token: 0x06001228 RID: 4648 RVA: 0x00038438 File Offset: 0x00036638
243 protected override void Dispose(bool disposing)
244 {
245 long num;
246 if (!this.disposed)
247 {
248 Stream stream = this.<InnerStream>k__BackingField;
249 this.disposed = true;
250 if (stream != null)
251 {
252 num = 0L;
253 stream.Dispose();
254 }
255 }
256 base.Dispose(num != 0L);
257 }
258
259 // Token: 0x04000E0B RID: 3595
261 private readonly WebOperation <Operation>k__BackingField;
262
263 // Token: 0x04000E0C RID: 3596
265 private readonly Stream <InnerStream>k__BackingField;
266
267 // Token: 0x04000E0D RID: 3597
268 private bool disposed;
269
270 // Token: 0x0200028E RID: 654
272 [StructLayout(3)]
274 {
275 // Token: 0x06001229 RID: 4649 RVA: 0x00038470 File Offset: 0x00036670
276 private void MoveNext()
277 {
279 WebOperation <Operation>k__BackingField = webReadStream.<Operation>k__BackingField;
280 CancellationToken cancellationToken = this.cancellationToken;
281 <Operation>k__BackingField.ThrowIfDisposed(cancellationToken);
282 if (this.buffer != null)
283 {
284 int num = this.offset;
285 int num2 = this.size;
286 Task task = this.<>u__2.m_task;
287 this.<>1__state = num;
288 return;
289 }
290 }
291
292 // Token: 0x0600122A RID: 4650 RVA: 0x00038574 File Offset: 0x00036774
297
298 // Token: 0x04000E0E RID: 3598
300
301 // Token: 0x04000E0F RID: 3599
303
304 // Token: 0x04000E10 RID: 3600
306
307 // Token: 0x04000E11 RID: 3601
309
310 // Token: 0x04000E12 RID: 3602
311 public byte[] buffer;
312
313 // Token: 0x04000E13 RID: 3603
314 public int offset;
315
316 // Token: 0x04000E14 RID: 3604
317 public int size;
318
319 // Token: 0x04000E15 RID: 3605
321
322 // Token: 0x04000E16 RID: 3606
324 }
325 }
326}
class f__AnonymousType0<< Count > j__TPar
void Dispose()
Definition Stream.cs:125
static WebException CreateRequestAbortedException()
static Exception FlattenException(Exception e)
override void Dispose(bool disposing)
override void SetLength(long value)
readonly WebOperation< Operation > k__BackingField
override int Read(byte[] buffer, int offset, int size)
readonly Stream< InnerStream > k__BackingField
WebReadStream(WebOperation operation, Stream innerStream)
override int EndRead(IAsyncResult r)
Task< int > ProcessReadAsync(byte[] buffer, int offset, int size, CancellationToken cancellationToken)
override IAsyncResult BeginRead(byte[] buffer, int offset, int size, AsyncCallback cb, object state)
Exception GetException(Exception e)
virtual Task FinishReading(CancellationToken cancellationToken)
override void Write(byte[] buffer, int offset, int count)
override Task< int > ReadAsync(byte[] buffer, int offset, int size, CancellationToken cancellationToken)
override long Seek(long offset, SeekOrigin origin)
static void End(IAsyncResult asyncResult)
Definition TaskToApm.cs:38
CancellationToken cancellationToken
ConfiguredTaskAwaitable< int >.ConfiguredTaskAwaiter u__1
AsyncTaskMethodBuilder< int ><> t__builder
void SetStateMachine(IAsyncStateMachine stateMachine)
ConfiguredTaskAwaitable.ConfiguredTaskAwaiter u__2