Files
Dec2017-Script-Dump/System/Net/HttpStreamAsyncResult.cs
T
2026-06-04 11:42:34 +02:00

122 lines
2.3 KiB
C#

using System;
using System.Threading;
namespace System.Net
{
// Token: 0x02000235 RID: 565
internal class HttpStreamAsyncResult : IAsyncResult
{
// Token: 0x060013C1 RID: 5057 RVA: 0x0003D324 File Offset: 0x0003B524
public void Complete(Exception e)
{
this.Error = e;
this.Complete();
}
// Token: 0x060013C2 RID: 5058 RVA: 0x0003D334 File Offset: 0x0003B534
public void Complete()
{
object obj = this.locker;
lock (obj)
{
if (!this.completed)
{
this.completed = true;
if (this.handle != null)
{
this.handle.Set();
}
if (this.Callback != null)
{
this.Callback.BeginInvoke(this, null, null);
}
}
}
}
// Token: 0x17000672 RID: 1650
// (get) Token: 0x060013C3 RID: 5059 RVA: 0x0003D3C0 File Offset: 0x0003B5C0
public object AsyncState
{
get
{
return this.State;
}
}
// Token: 0x17000673 RID: 1651
// (get) Token: 0x060013C4 RID: 5060 RVA: 0x0003D3C8 File Offset: 0x0003B5C8
public WaitHandle AsyncWaitHandle
{
get
{
object obj = this.locker;
lock (obj)
{
if (this.handle == null)
{
this.handle = new ManualResetEvent(this.completed);
}
}
return this.handle;
}
}
// Token: 0x17000674 RID: 1652
// (get) Token: 0x060013C5 RID: 5061 RVA: 0x0003D42C File Offset: 0x0003B62C
public bool CompletedSynchronously
{
get
{
return this.SynchRead == this.Count;
}
}
// Token: 0x17000675 RID: 1653
// (get) Token: 0x060013C6 RID: 5062 RVA: 0x0003D43C File Offset: 0x0003B63C
public bool IsCompleted
{
get
{
object obj = this.locker;
bool flag;
lock (obj)
{
flag = this.completed;
}
return flag;
}
}
// Token: 0x04001118 RID: 4376
private object locker = new object();
// Token: 0x04001119 RID: 4377
private ManualResetEvent handle;
// Token: 0x0400111A RID: 4378
private bool completed;
// Token: 0x0400111B RID: 4379
internal byte[] Buffer;
// Token: 0x0400111C RID: 4380
internal int Offset;
// Token: 0x0400111D RID: 4381
internal int Count;
// Token: 0x0400111E RID: 4382
internal AsyncCallback Callback;
// Token: 0x0400111F RID: 4383
internal object State;
// Token: 0x04001120 RID: 4384
internal int SynchRead;
// Token: 0x04001121 RID: 4385
internal Exception Error;
}
}