using System; using System.Threading; namespace System.IO { // Token: 0x020001CD RID: 461 internal class StreamAsyncResult : IAsyncResult { // Token: 0x06001793 RID: 6035 RVA: 0x0005AC08 File Offset: 0x00058E08 public StreamAsyncResult(object state) { this.state = state; } // Token: 0x06001794 RID: 6036 RVA: 0x0005AC20 File Offset: 0x00058E20 public void SetComplete(Exception e) { this.exc = e; this.completed = true; lock (this) { if (this.wh != null) { this.wh.Set(); } } } // Token: 0x06001795 RID: 6037 RVA: 0x0005AC84 File Offset: 0x00058E84 public void SetComplete(Exception e, int nbytes) { this.nbytes = nbytes; this.SetComplete(e); } // Token: 0x1700042C RID: 1068 // (get) Token: 0x06001796 RID: 6038 RVA: 0x0005AC94 File Offset: 0x00058E94 public object AsyncState { get { return this.state; } } // Token: 0x1700042D RID: 1069 // (get) Token: 0x06001797 RID: 6039 RVA: 0x0005AC9C File Offset: 0x00058E9C public WaitHandle AsyncWaitHandle { get { WaitHandle waitHandle; lock (this) { if (this.wh == null) { this.wh = new ManualResetEvent(this.completed); } waitHandle = this.wh; } return waitHandle; } } // Token: 0x1700042E RID: 1070 // (get) Token: 0x06001798 RID: 6040 RVA: 0x0005AD04 File Offset: 0x00058F04 public virtual bool CompletedSynchronously { get { return true; } } // Token: 0x1700042F RID: 1071 // (get) Token: 0x06001799 RID: 6041 RVA: 0x0005AD08 File Offset: 0x00058F08 public bool IsCompleted { get { return this.completed; } } // Token: 0x17000430 RID: 1072 // (get) Token: 0x0600179A RID: 6042 RVA: 0x0005AD10 File Offset: 0x00058F10 public Exception Exception { get { return this.exc; } } // Token: 0x17000431 RID: 1073 // (get) Token: 0x0600179B RID: 6043 RVA: 0x0005AD18 File Offset: 0x00058F18 public int NBytes { get { return this.nbytes; } } // Token: 0x17000432 RID: 1074 // (get) Token: 0x0600179C RID: 6044 RVA: 0x0005AD20 File Offset: 0x00058F20 // (set) Token: 0x0600179D RID: 6045 RVA: 0x0005AD28 File Offset: 0x00058F28 public bool Done { get { return this.done; } set { this.done = value; } } // Token: 0x040006FB RID: 1787 private object state; // Token: 0x040006FC RID: 1788 private bool completed; // Token: 0x040006FD RID: 1789 private bool done; // Token: 0x040006FE RID: 1790 private Exception exc; // Token: 0x040006FF RID: 1791 private int nbytes = -1; // Token: 0x04000700 RID: 1792 private ManualResetEvent wh; } }