示例#1
0
 protected override void HandleCompleted(BaseAsyncResult.PerRequest pereq)
 {
     if (pereq != null)
     {
         base.SetCompletedSynchronously(pereq.RequestCompletedSynchronously);
         if (pereq.RequestCompleted)
         {
             Interlocked.CompareExchange <BaseAsyncResult.PerRequest>(ref this.perRequest, null, pereq);
             pereq.Dispose();
         }
     }
     base.HandleCompleted();
 }
示例#2
0
 protected override void FinishCurrentChange(BaseAsyncResult.PerRequest pereq)
 {
     base.FinishCurrentChange(pereq);
     if (this.ResponseStream.Position != 0L)
     {
         this.ResponseStream.Position = 0L;
         this.HandleOperationResponseData(this.httpWebResponse, this.ResponseStream);
     }
     else
     {
         this.HandleOperationResponseData(this.httpWebResponse, null);
     }
     pereq.Dispose();
     base.perRequest = null;
     if (!pereq.RequestCompletedSynchronously && !base.IsCompletedInternally)
     {
         this.BeginCreateNextChange();
     }
 }