Beispiel #1
0
 private void OnPumpComplete(IAsyncResult result)
 {
     try
     {
         try
         {
             Pump.EndRunPump(result);
             if (this.outputStream != null)
             {
                 this.outputStream.Flush();
             }
         }
         catch (Exception exception1)
         {
             Exception exception = exception1;
             if (Fx.IsFatal(exception))
             {
                 throw;
             }
             Fx.Exception.TraceHandled(exception, "PumpStream.OnPumpComplete", null);
         }
     }
     finally
     {
         Action pumpCompletedEvent = this.PumpCompletedEvent;
         if (pumpCompletedEvent != null)
         {
             pumpCompletedEvent();
         }
     }
 }
Beispiel #2
0
 public void RunPump()
 {
     Pump.EndRunPump(this.BeginRunPump(null, null));
 }