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); } }
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); } } }
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); } }