private static void OnFinalizeCorrelationCompletedCallback(IAsyncResult result) { if (!result.CompletedSynchronously) { bool flag; ContextRequestChannelBase <TChannel> .RequestAsyncResult asyncState = (ContextRequestChannelBase <TChannel> .RequestAsyncResult)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 OnRequestCompletedCallback(IAsyncResult result) { if (!result.CompletedSynchronously) { ContextRequestChannelBase <TChannel> .RequestAsyncResult asyncState = (ContextRequestChannelBase <TChannel> .RequestAsyncResult)result.AsyncState; Exception exception = null; try { asyncState.OnRequestCompleted(result); } catch (Exception exception2) { if (Fx.IsFatal(exception2)) { throw; } exception = exception2; } asyncState.Complete(false, exception); } }