using System; using System.Threading; namespace System.IO { // Token: 0x020001BC RID: 444 internal class FileStreamAsyncResult : IAsyncResult { // Token: 0x060016CA RID: 5834 RVA: 0x00058298 File Offset: 0x00056498 public FileStreamAsyncResult(AsyncCallback cb, object state) { this.state = state; this.realcb = cb; if (this.realcb != null) { this.cb = new AsyncCallback(FileStreamAsyncResult.CBWrapper); } this.wh = new ManualResetEvent(false); } // Token: 0x060016CB RID: 5835 RVA: 0x000582D8 File Offset: 0x000564D8 private static void CBWrapper(IAsyncResult ares) { FileStreamAsyncResult fileStreamAsyncResult = (FileStreamAsyncResult)ares; fileStreamAsyncResult.realcb.BeginInvoke(ares, null, null); } // Token: 0x060016CC RID: 5836 RVA: 0x000582FC File Offset: 0x000564FC public void SetComplete(Exception e) { this.exc = e; this.completed = true; this.wh.Set(); if (this.cb != null) { this.cb(this); } } // Token: 0x060016CD RID: 5837 RVA: 0x00058330 File Offset: 0x00056530 public void SetComplete(Exception e, int nbytes) { this.BytesRead = nbytes; this.SetComplete(e); } // Token: 0x060016CE RID: 5838 RVA: 0x00058340 File Offset: 0x00056540 public void SetComplete(Exception e, int nbytes, bool synch) { this.completedSynch = synch; this.SetComplete(e, nbytes); } // Token: 0x17000401 RID: 1025 // (get) Token: 0x060016CF RID: 5839 RVA: 0x00058354 File Offset: 0x00056554 public object AsyncState { get { return this.state; } } // Token: 0x17000402 RID: 1026 // (get) Token: 0x060016D0 RID: 5840 RVA: 0x0005835C File Offset: 0x0005655C public bool CompletedSynchronously { get { return this.completedSynch; } } // Token: 0x17000403 RID: 1027 // (get) Token: 0x060016D1 RID: 5841 RVA: 0x00058364 File Offset: 0x00056564 public WaitHandle AsyncWaitHandle { get { return this.wh; } } // Token: 0x17000404 RID: 1028 // (get) Token: 0x060016D2 RID: 5842 RVA: 0x0005836C File Offset: 0x0005656C public bool IsCompleted { get { return this.completed; } } // Token: 0x17000405 RID: 1029 // (get) Token: 0x060016D3 RID: 5843 RVA: 0x00058374 File Offset: 0x00056574 public Exception Exception { get { return this.exc; } } // Token: 0x17000406 RID: 1030 // (get) Token: 0x060016D4 RID: 5844 RVA: 0x0005837C File Offset: 0x0005657C // (set) Token: 0x060016D5 RID: 5845 RVA: 0x00058384 File Offset: 0x00056584 public bool Done { get { return this.done; } set { this.done = value; } } // Token: 0x0400069C RID: 1692 private object state; // Token: 0x0400069D RID: 1693 private bool completed; // Token: 0x0400069E RID: 1694 private bool done; // Token: 0x0400069F RID: 1695 private Exception exc; // Token: 0x040006A0 RID: 1696 private ManualResetEvent wh; // Token: 0x040006A1 RID: 1697 private AsyncCallback cb; // Token: 0x040006A2 RID: 1698 private bool completedSynch; // Token: 0x040006A3 RID: 1699 public byte[] Buffer; // Token: 0x040006A4 RID: 1700 public int Offset; // Token: 0x040006A5 RID: 1701 public int Count; // Token: 0x040006A6 RID: 1702 public int OriginalCount; // Token: 0x040006A7 RID: 1703 public int BytesRead; // Token: 0x040006A8 RID: 1704 private AsyncCallback realcb; } }