private static void OnUpgradeInitiatorOpen(IAsyncResult result) { if (result.CompletedSynchronously) { return; } Microsoft.ServiceBus.Channels.ClientFramingDuplexSessionChannel.SendPreambleAsyncResult asyncState = (Microsoft.ServiceBus.Channels.ClientFramingDuplexSessionChannel.SendPreambleAsyncResult)result.AsyncState; bool flag = false; Exception exception = null; try { flag = asyncState.HandleInitiatorOpen(result); } catch (Exception exception2) { Exception exception1 = exception2; if (Fx.IsFatal(exception1)) { throw; } flag = true; exception = exception1; } if (flag) { asyncState.Complete(false, exception); } }
private static void OnWritePreambleEnd(IAsyncResult result) { if (result.CompletedSynchronously) { return; } Microsoft.ServiceBus.Channels.ClientFramingDuplexSessionChannel.SendPreambleAsyncResult asyncState = (Microsoft.ServiceBus.Channels.ClientFramingDuplexSessionChannel.SendPreambleAsyncResult)result.AsyncState; Exception exception = null; bool flag = false; try { asyncState.connection.EndWrite(result); flag = asyncState.ReadAck(); } catch (Exception exception2) { Exception exception1 = exception2; if (Fx.IsFatal(exception1)) { throw; } flag = true; exception = exception1; } if (flag) { asyncState.Complete(false, exception); } }
private static void OnReadPreambleAck(object state) { bool flag; Microsoft.ServiceBus.Channels.ClientFramingDuplexSessionChannel.SendPreambleAsyncResult sendPreambleAsyncResult = (Microsoft.ServiceBus.Channels.ClientFramingDuplexSessionChannel.SendPreambleAsyncResult)state; Exception exception = null; try { flag = sendPreambleAsyncResult.HandlePreambleAck(); } catch (Exception exception2) { Exception exception1 = exception2; if (Fx.IsFatal(exception1)) { throw; } flag = true; exception = exception1; } if (flag) { sendPreambleAsyncResult.Complete(false, exception); } }