Exemple #1
0
 private static void OnWritePreambleEnd(IAsyncResult result)
 {
     if (!result.CompletedSynchronously)
     {
         bool flag;
         StreamedFramingRequestChannel.StreamedConnectionPoolHelper.SendPreambleAsyncResult asyncState = (StreamedFramingRequestChannel.StreamedConnectionPoolHelper.SendPreambleAsyncResult)result.AsyncState;
         Exception exception = null;
         try
         {
             asyncState.connection.EndWrite(result);
             flag = asyncState.ReadPreambleAck();
         }
         catch (Exception exception2)
         {
             if (Fx.IsFatal(exception2))
             {
                 throw;
             }
             flag      = true;
             exception = exception2;
         }
         if (flag)
         {
             asyncState.Complete(false, exception);
         }
     }
 }
Exemple #2
0
 private static void OnFailedUpgrade(IAsyncResult result)
 {
     if (!result.CompletedSynchronously)
     {
         StreamedFramingRequestChannel.StreamedConnectionPoolHelper.SendPreambleAsyncResult asyncState = (StreamedFramingRequestChannel.StreamedConnectionPoolHelper.SendPreambleAsyncResult)result.AsyncState;
         Exception exception = null;
         try
         {
             ConnectionUpgradeHelper.EndDecodeFramingFault(result);
         }
         catch (Exception exception2)
         {
             if (Fx.IsFatal(exception2))
             {
                 throw;
             }
             exception = exception2;
         }
         asyncState.Complete(false, exception);
     }
 }
Exemple #3
0
                private static void OnReadPreambleAck(object state)
                {
                    bool flag;

                    StreamedFramingRequestChannel.StreamedConnectionPoolHelper.SendPreambleAsyncResult result = (StreamedFramingRequestChannel.StreamedConnectionPoolHelper.SendPreambleAsyncResult)state;
                    Exception exception = null;

                    try
                    {
                        flag = result.HandlePreambleAck();
                    }
                    catch (Exception exception2)
                    {
                        if (Fx.IsFatal(exception2))
                        {
                            throw;
                        }
                        flag      = true;
                        exception = exception2;
                    }
                    if (flag)
                    {
                        result.Complete(false, exception);
                    }
                }
Exemple #4
0
 public static IConnection End(IAsyncResult result, out SecurityMessageProperty remoteSecurity)
 {
     StreamedFramingRequestChannel.StreamedConnectionPoolHelper.SendPreambleAsyncResult result2 = AsyncResult.End <StreamedFramingRequestChannel.StreamedConnectionPoolHelper.SendPreambleAsyncResult>(result);
     remoteSecurity = result2.remoteSecurity;
     return(result2.connection);
 }