private static void OnWriteMessage(IAsyncResult result) { if (!result.CompletedSynchronously) { bool flag; StreamedFramingRequestChannel.StreamedFramingAsyncRequest asyncState = (StreamedFramingRequestChannel.StreamedFramingAsyncRequest)result.AsyncState; Exception exception = null; bool flag2 = true; try { flag = asyncState.HandleWriteMessage(result); flag2 = false; } catch (Exception exception2) { if (Fx.IsFatal(exception2)) { throw; } flag = true; exception = exception2; } finally { if (flag2) { asyncState.Cleanup(); } } if (flag) { asyncState.Complete(false, exception); } } }
private static void OnReceiveReply(IAsyncResult result) { bool flag; StreamedFramingRequestChannel.StreamedFramingAsyncRequest asyncState = (StreamedFramingRequestChannel.StreamedFramingAsyncRequest)result.AsyncState; Exception exception = null; bool flag2 = true; try { flag = asyncState.CompleteReceiveReply(result); flag2 = false; } catch (Exception exception2) { if (Fx.IsFatal(exception2)) { throw; } flag = true; exception = exception2; } finally { if (flag2) { asyncState.Cleanup(); } } if (flag) { asyncState.Complete(false, exception); } }