scripts
This commit is contained in:
@@ -0,0 +1,227 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
|
||||
namespace System.Net
|
||||
{
|
||||
// Token: 0x0200021D RID: 541
|
||||
internal class FtpAsyncResult : IAsyncResult
|
||||
{
|
||||
// Token: 0x06001278 RID: 4728 RVA: 0x00037CC0 File Offset: 0x00035EC0
|
||||
public FtpAsyncResult(AsyncCallback callback, object state)
|
||||
{
|
||||
this.callback = callback;
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
// Token: 0x170005FF RID: 1535
|
||||
// (get) Token: 0x06001279 RID: 4729 RVA: 0x00037CE4 File Offset: 0x00035EE4
|
||||
public object AsyncState
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.state;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000600 RID: 1536
|
||||
// (get) Token: 0x0600127A RID: 4730 RVA: 0x00037CEC File Offset: 0x00035EEC
|
||||
public WaitHandle AsyncWaitHandle
|
||||
{
|
||||
get
|
||||
{
|
||||
object obj = this.locker;
|
||||
lock (obj)
|
||||
{
|
||||
if (this.waitHandle == null)
|
||||
{
|
||||
this.waitHandle = new ManualResetEvent(false);
|
||||
}
|
||||
}
|
||||
return this.waitHandle;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000601 RID: 1537
|
||||
// (get) Token: 0x0600127B RID: 4731 RVA: 0x00037D4C File Offset: 0x00035F4C
|
||||
public bool CompletedSynchronously
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.synch;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000602 RID: 1538
|
||||
// (get) Token: 0x0600127C RID: 4732 RVA: 0x00037D54 File Offset: 0x00035F54
|
||||
public bool IsCompleted
|
||||
{
|
||||
get
|
||||
{
|
||||
object obj = this.locker;
|
||||
bool flag;
|
||||
lock (obj)
|
||||
{
|
||||
flag = this.completed;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000603 RID: 1539
|
||||
// (get) Token: 0x0600127D RID: 4733 RVA: 0x00037DA4 File Offset: 0x00035FA4
|
||||
internal bool GotException
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.exception != null;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000604 RID: 1540
|
||||
// (get) Token: 0x0600127E RID: 4734 RVA: 0x00037DB4 File Offset: 0x00035FB4
|
||||
internal Exception Exception
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.exception;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000605 RID: 1541
|
||||
// (get) Token: 0x0600127F RID: 4735 RVA: 0x00037DBC File Offset: 0x00035FBC
|
||||
// (set) Token: 0x06001280 RID: 4736 RVA: 0x00037DC4 File Offset: 0x00035FC4
|
||||
internal FtpWebResponse Response
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.response;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.response = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000606 RID: 1542
|
||||
// (get) Token: 0x06001281 RID: 4737 RVA: 0x00037DD0 File Offset: 0x00035FD0
|
||||
// (set) Token: 0x06001282 RID: 4738 RVA: 0x00037DD8 File Offset: 0x00035FD8
|
||||
internal Stream Stream
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.stream;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.stream = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06001283 RID: 4739 RVA: 0x00037DE4 File Offset: 0x00035FE4
|
||||
internal void WaitUntilComplete()
|
||||
{
|
||||
if (this.IsCompleted)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.AsyncWaitHandle.WaitOne();
|
||||
}
|
||||
|
||||
// Token: 0x06001284 RID: 4740 RVA: 0x00037E00 File Offset: 0x00036000
|
||||
internal bool WaitUntilComplete(int timeout, bool exitContext)
|
||||
{
|
||||
return this.IsCompleted || this.AsyncWaitHandle.WaitOne(timeout, exitContext);
|
||||
}
|
||||
|
||||
// Token: 0x06001285 RID: 4741 RVA: 0x00037E28 File Offset: 0x00036028
|
||||
internal void SetCompleted(bool synch, Exception exc, FtpWebResponse response)
|
||||
{
|
||||
this.synch = synch;
|
||||
this.exception = exc;
|
||||
this.response = response;
|
||||
object obj = this.locker;
|
||||
lock (obj)
|
||||
{
|
||||
this.completed = true;
|
||||
if (this.waitHandle != null)
|
||||
{
|
||||
this.waitHandle.Set();
|
||||
}
|
||||
}
|
||||
this.DoCallback();
|
||||
}
|
||||
|
||||
// Token: 0x06001286 RID: 4742 RVA: 0x00037EA4 File Offset: 0x000360A4
|
||||
internal void SetCompleted(bool synch, FtpWebResponse response)
|
||||
{
|
||||
this.SetCompleted(synch, null, response);
|
||||
}
|
||||
|
||||
// Token: 0x06001287 RID: 4743 RVA: 0x00037EB0 File Offset: 0x000360B0
|
||||
internal void SetCompleted(bool synch, Exception exc)
|
||||
{
|
||||
this.SetCompleted(synch, exc, null);
|
||||
}
|
||||
|
||||
// Token: 0x06001288 RID: 4744 RVA: 0x00037EBC File Offset: 0x000360BC
|
||||
internal void DoCallback()
|
||||
{
|
||||
if (this.callback != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.callback(this);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06001289 RID: 4745 RVA: 0x00037F08 File Offset: 0x00036108
|
||||
internal void Reset()
|
||||
{
|
||||
this.exception = null;
|
||||
this.synch = false;
|
||||
this.response = null;
|
||||
this.state = null;
|
||||
object obj = this.locker;
|
||||
lock (obj)
|
||||
{
|
||||
this.completed = false;
|
||||
if (this.waitHandle != null)
|
||||
{
|
||||
this.waitHandle.Reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000FD2 RID: 4050
|
||||
private FtpWebResponse response;
|
||||
|
||||
// Token: 0x04000FD3 RID: 4051
|
||||
private ManualResetEvent waitHandle;
|
||||
|
||||
// Token: 0x04000FD4 RID: 4052
|
||||
private Exception exception;
|
||||
|
||||
// Token: 0x04000FD5 RID: 4053
|
||||
private AsyncCallback callback;
|
||||
|
||||
// Token: 0x04000FD6 RID: 4054
|
||||
private Stream stream;
|
||||
|
||||
// Token: 0x04000FD7 RID: 4055
|
||||
private object state;
|
||||
|
||||
// Token: 0x04000FD8 RID: 4056
|
||||
private bool completed;
|
||||
|
||||
// Token: 0x04000FD9 RID: 4057
|
||||
private bool synch;
|
||||
|
||||
// Token: 0x04000FDA RID: 4058
|
||||
private object locker = new object();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user