290 lines
14 KiB
C#
290 lines
14 KiB
C#
using System;
|
|
using System.IO;
|
|
using BestHTTP.Extensions;
|
|
using BestHTTP.Logger;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP
|
|
{
|
|
// Token: 0x0200188C RID: 6284
|
|
[Token(Token = "0x200188C")]
|
|
public sealed class StreamList : Stream
|
|
{
|
|
// Token: 0x06009307 RID: 37639 RVA: 0x001E1C08 File Offset: 0x001DFE08
|
|
[Token(Token = "0x6009307")]
|
|
[Address(RVA = "0x1C3CA20", Offset = "0x1C3B820", VA = "0x181C3CA20")]
|
|
public StreamList(params Stream[] streams)
|
|
{
|
|
this.Streams = streams;
|
|
this.CurrentIdx = (int)((ulong)0L);
|
|
}
|
|
|
|
// Token: 0x1700173A RID: 5946
|
|
// (get) Token: 0x06009308 RID: 37640 RVA: 0x001E1C2C File Offset: 0x001DFE2C
|
|
[Token(Token = "0x1700173A")]
|
|
public override bool CanRead
|
|
{
|
|
[Token(Token = "0x6009308")]
|
|
[Address(RVA = "0x1C3CA90", Offset = "0x1C3B890", VA = "0x181C3CA90", Slot = "7")]
|
|
get
|
|
{
|
|
Stream[] streams = this.Streams;
|
|
int currentIdx = this.CurrentIdx;
|
|
int length = streams.Length;
|
|
if (currentIdx < length)
|
|
{
|
|
return streams[currentIdx].CanRead;
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
}
|
|
|
|
// Token: 0x1700173B RID: 5947
|
|
// (get) Token: 0x06009309 RID: 37641 RVA: 0x001E1C68 File Offset: 0x001DFE68
|
|
[Token(Token = "0x1700173B")]
|
|
public override bool CanSeek
|
|
{
|
|
[Token(Token = "0x6009309")]
|
|
[Address(RVA = "0x403930", Offset = "0x402730", VA = "0x180403930", Slot = "8")]
|
|
get
|
|
{
|
|
}
|
|
}
|
|
|
|
// Token: 0x1700173C RID: 5948
|
|
// (get) Token: 0x0600930A RID: 37642 RVA: 0x001E1C78 File Offset: 0x001DFE78
|
|
[Token(Token = "0x1700173C")]
|
|
public override bool CanWrite
|
|
{
|
|
[Token(Token = "0x600930A")]
|
|
[Address(RVA = "0x1C3CAF0", Offset = "0x1C3B8F0", VA = "0x181C3CAF0", Slot = "9")]
|
|
get
|
|
{
|
|
Stream[] streams = this.Streams;
|
|
int currentIdx = this.CurrentIdx;
|
|
int length = streams.Length;
|
|
if (currentIdx < length)
|
|
{
|
|
return streams[currentIdx].CanRead;
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600930B RID: 37643 RVA: 0x001E1CB4 File Offset: 0x001DFEB4
|
|
[Token(Token = "0x600930B")]
|
|
[Address(RVA = "0x1C3C680", Offset = "0x1C3B480", VA = "0x181C3C680", Slot = "17")]
|
|
public override void Flush()
|
|
{
|
|
Stream[] streams = this.Streams;
|
|
if (this.CurrentIdx < streams.Length)
|
|
{
|
|
int i = 0;
|
|
Stream stream = this.Streams[i];
|
|
i++;
|
|
while (i <= this.CurrentIdx)
|
|
{
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x1700173D RID: 5949
|
|
// (get) Token: 0x0600930C RID: 37644 RVA: 0x001E1CF8 File Offset: 0x001DFEF8
|
|
[Token(Token = "0x1700173D")]
|
|
public override long Length
|
|
{
|
|
[Token(Token = "0x600930C")]
|
|
[Address(RVA = "0x1C3CB50", Offset = "0x1C3B950", VA = "0x181C3CB50", Slot = "10")]
|
|
get
|
|
{
|
|
Stream[] streams = this.Streams;
|
|
int length = streams.Length;
|
|
if (this.CurrentIdx < length)
|
|
{
|
|
int num = 0;
|
|
if (num < streams.Length)
|
|
{
|
|
bool canWrite = streams[num].CanWrite;
|
|
Stream[] streams2 = this.Streams;
|
|
num++;
|
|
num += (canWrite ? 1 : 0);
|
|
}
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600930D RID: 37645 RVA: 0x001E1D4C File Offset: 0x001DFF4C
|
|
[Token(Token = "0x600930D")]
|
|
[Address(RVA = "0x1C3C700", Offset = "0x1C3B500", VA = "0x181C3C700", Slot = "27")]
|
|
public override int Read(byte[] buffer, int offset, int count)
|
|
{
|
|
Stream[] streams = this.Streams;
|
|
int currentIdx = this.CurrentIdx;
|
|
int length = streams.Length;
|
|
if (currentIdx < length)
|
|
{
|
|
Stream stream = streams[currentIdx];
|
|
int currentIdx2 = this.CurrentIdx;
|
|
int num = currentIdx2 + 1;
|
|
this.CurrentIdx = num;
|
|
Stream[] streams2 = this.Streams;
|
|
int length2 = streams2.Length;
|
|
if (currentIdx2 < length2)
|
|
{
|
|
int num2 = currentIdx2 + 1;
|
|
Stream stream2 = streams2[num2];
|
|
}
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600930E RID: 37646 RVA: 0x001E1DC0 File Offset: 0x001DFFC0
|
|
[Token(Token = "0x600930E")]
|
|
[Address(RVA = "0x1C3C9B0", Offset = "0x1C3B7B0", VA = "0x181C3C9B0", Slot = "29")]
|
|
public override void Write(byte[] buffer, int offset, int count)
|
|
{
|
|
Stream[] streams = this.Streams;
|
|
int currentIdx = this.CurrentIdx;
|
|
int length = streams.Length;
|
|
if (currentIdx < length)
|
|
{
|
|
bool canRead = streams[currentIdx].CanRead;
|
|
return;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600930F RID: 37647 RVA: 0x001E1DFC File Offset: 0x001DFFFC
|
|
[Token(Token = "0x600930F")]
|
|
[Address(RVA = "0x1C3C8F0", Offset = "0x1C3B6F0", VA = "0x181C3C8F0")]
|
|
public void Write(string str)
|
|
{
|
|
byte[] asciibytes = str.GetASCIIBytes();
|
|
int num = this.ReadByte();
|
|
VariableSizedBufferPool.Release(asciibytes);
|
|
}
|
|
|
|
// Token: 0x06009310 RID: 37648 RVA: 0x001E1E24 File Offset: 0x001E0024
|
|
[Token(Token = "0x6009310")]
|
|
[Address(RVA = "0x1C3C540", Offset = "0x1C3B340", VA = "0x181C3C540", Slot = "16")]
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
int num = 0;
|
|
Stream[] streams = this.Streams;
|
|
if (num < streams.Length)
|
|
{
|
|
this.Streams[num].Dispose();
|
|
ILogger logger = HTTPManager.Logger;
|
|
num++;
|
|
}
|
|
}
|
|
|
|
// Token: 0x1700173E RID: 5950
|
|
// (get) Token: 0x06009311 RID: 37649 RVA: 0x001E1E78 File Offset: 0x001E0078
|
|
// (set) Token: 0x06009312 RID: 37650 RVA: 0x001E1E90 File Offset: 0x001E0090
|
|
[Token(Token = "0x1700173E")]
|
|
public override long Position
|
|
{
|
|
[Token(Token = "0x6009311")]
|
|
[Address(RVA = "0x1C3CC00", Offset = "0x1C3BA00", VA = "0x181C3CC00", Slot = "11")]
|
|
get
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009311)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int64 BestHTTP.StreamList::get_Position()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:NotImplementedException(var_0_0A, newobj:NotImplementedException(NotImplementedException::.ctor, ldstr:string("Position get")))
|
|
}
|
|
|
|
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
|
|
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
|
|
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
|
|
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
|
|
--- End of inner exception stack trace ---
|
|
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
|
|
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 1663
|
|
*/;
|
|
}
|
|
[Token(Token = "0x6009312")]
|
|
[Address(RVA = "0x1C3CC60", Offset = "0x1C3BA60", VA = "0x181C3CC60", Slot = "12")]
|
|
set
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009312)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.StreamList::set_Position(System.Int64)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:NotImplementedException(var_0_0A, newobj:NotImplementedException(NotImplementedException::.ctor, ldstr:string("Position set")))
|
|
}
|
|
|
|
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
|
|
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
|
|
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
|
|
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
|
|
--- End of inner exception stack trace ---
|
|
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
|
|
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 1663
|
|
*/;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06009313 RID: 37651 RVA: 0x001E1EA8 File Offset: 0x001E00A8
|
|
[Token(Token = "0x6009313")]
|
|
[Address(RVA = "0x1C3C830", Offset = "0x1C3B630", VA = "0x181C3C830", Slot = "25")]
|
|
public override long Seek(long offset, SeekOrigin origin)
|
|
{
|
|
Stream[] streams = this.Streams;
|
|
int currentIdx = this.CurrentIdx;
|
|
int length = streams.Length;
|
|
if (currentIdx < length)
|
|
{
|
|
bool canRead = streams[currentIdx].CanRead;
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06009314 RID: 37652 RVA: 0x001E1EE4 File Offset: 0x001E00E4
|
|
[Token(Token = "0x6009314")]
|
|
[Address(RVA = "0x1C3C890", Offset = "0x1C3B690", VA = "0x181C3C890", Slot = "26")]
|
|
public override void SetLength(long value)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009314)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.StreamList::SetLength(System.Int64)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:NotImplementedException(var_0_0A, newobj:NotImplementedException(NotImplementedException::.ctor, ldstr:string("SetLength")))
|
|
}
|
|
|
|
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
|
|
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
|
|
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
|
|
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
|
|
--- End of inner exception stack trace ---
|
|
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
|
|
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 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x04006478 RID: 25720
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4006478")]
|
|
private Stream[] Streams;
|
|
|
|
// Token: 0x04006479 RID: 25721
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x4006479")]
|
|
private int CurrentIdx;
|
|
}
|
|
}
|