private static void OnReleaseConnectionPoolScheduled(object state) { bool flag; ConnectionOrientedTransportChannelFactory <TChannel> .CloseAsyncResult result = (ConnectionOrientedTransportChannelFactory <TChannel> .CloseAsyncResult)state; Exception exception = null; try { flag = result.OnReleaseConnectionPoolScheduled(); } catch (Exception exception2) { if (Fx.IsFatal(exception2)) { throw; } flag = true; exception = exception2; } if (flag) { result.Complete(false, exception); } }
private static void OnOpenComplete(IAsyncResult result) { if (!result.CompletedSynchronously) { ConnectionOrientedTransportChannelFactory <TChannel> .OpenAsyncResult asyncState = (ConnectionOrientedTransportChannelFactory <TChannel> .OpenAsyncResult)result.AsyncState; Exception exception = null; try { asyncState.communicationObject.EndOpen(result); } catch (Exception exception2) { if (Fx.IsFatal(exception2)) { throw; } exception = exception2; } asyncState.Complete(false, exception); } }
private static void OnCloseComplete(IAsyncResult result) { if (!result.CompletedSynchronously) { ConnectionOrientedTransportChannelFactory <TChannel> .CloseAsyncResult asyncState = (ConnectionOrientedTransportChannelFactory <TChannel> .CloseAsyncResult)result.AsyncState; Exception exception = null; try { asyncState.upgradeProvider.EndClose(result); } catch (Exception exception2) { if (Fx.IsFatal(exception2)) { throw; } exception = exception2; } asyncState.Complete(false, exception); } }