private static void OnWriteComplete(IAsyncResult result) { if (result.CompletedSynchronously) { return; } Microsoft.ServiceBus.Channels.FramingDuplexSessionChannel.SendAsyncResult asyncState = (Microsoft.ServiceBus.Channels.FramingDuplexSessionChannel.SendAsyncResult)result.AsyncState; Exception exception = null; try { asyncState.channel.Connection.EndWrite(result); } catch (Exception exception2) { Exception exception1 = exception2; if (Fx.IsFatal(exception1)) { throw; } exception = exception1; } asyncState.Cleanup(exception == null); asyncState.Complete(false, exception); }
private static void OnEnterComplete(object state) { Microsoft.ServiceBus.Channels.FramingDuplexSessionChannel.SendAsyncResult sendAsyncResult = (Microsoft.ServiceBus.Channels.FramingDuplexSessionChannel.SendAsyncResult)state; bool flag = false; Exception exception = null; try { flag = sendAsyncResult.WriteCore(); } catch (Exception exception2) { Exception exception1 = exception2; if (Fx.IsFatal(exception1)) { throw; } flag = true; exception = exception1; } if (flag) { sendAsyncResult.Cleanup(exception == null); sendAsyncResult.Complete(false, exception); } }