private static void OnFinalizeCorrelationCompletedCallback(IAsyncResult result) { if (!result.CompletedSynchronously) { bool flag; ContextOutputChannelBase <TChannel> .SendAsyncResult asyncState = (ContextOutputChannelBase <TChannel> .SendAsyncResult)result.AsyncState; Exception exception = null; try { flag = asyncState.OnFinalizeCorrelationCompleted(result); } catch (Exception exception2) { if (Fx.IsFatal(exception2)) { throw; } exception = exception2; flag = true; } if (flag) { asyncState.Complete(false, exception); } } }
private static void OnSendCompletedCallback(IAsyncResult result) { if (!result.CompletedSynchronously) { ContextOutputChannelBase <TChannel> .SendAsyncResult asyncState = (ContextOutputChannelBase <TChannel> .SendAsyncResult)result.AsyncState; Exception exception = null; try { asyncState.OnSendCompleted(result); } catch (Exception exception2) { if (Fx.IsFatal(exception2)) { throw; } exception = exception2; } asyncState.Complete(false, exception); } }