示例#1
0
                private static void OnWritePreambleEnd(IAsyncResult result)
                {
                    bool flag;

                    if (result.CompletedSynchronously)
                    {
                        return;
                    }
                    Microsoft.ServiceBus.Channels.StreamedFramingRequestChannel.StreamedConnectionPoolHelper.SendPreambleAsyncResult asyncState = (Microsoft.ServiceBus.Channels.StreamedFramingRequestChannel.StreamedConnectionPoolHelper.SendPreambleAsyncResult)result.AsyncState;
                    Exception exception = null;

                    try
                    {
                        asyncState.connection.EndWrite(result);
                        flag = asyncState.ReadPreambleAck();
                    }
                    catch (Exception exception2)
                    {
                        Exception exception1 = exception2;
                        if (Fx.IsFatal(exception1))
                        {
                            throw;
                        }
                        flag      = true;
                        exception = exception1;
                    }
                    if (flag)
                    {
                        asyncState.Complete(false, exception);
                    }
                }
示例#2
0
                private static void OnFailedUpgrade(IAsyncResult result)
                {
                    if (result.CompletedSynchronously)
                    {
                        return;
                    }
                    Microsoft.ServiceBus.Channels.StreamedFramingRequestChannel.StreamedConnectionPoolHelper.SendPreambleAsyncResult asyncState = (Microsoft.ServiceBus.Channels.StreamedFramingRequestChannel.StreamedConnectionPoolHelper.SendPreambleAsyncResult)result.AsyncState;
                    Exception exception = null;

                    try
                    {
                        Microsoft.ServiceBus.Channels.ConnectionUpgradeHelper.EndDecodeFramingFault(result);
                    }
                    catch (Exception exception2)
                    {
                        Exception exception1 = exception2;
                        if (Fx.IsFatal(exception1))
                        {
                            throw;
                        }
                        exception = exception1;
                    }
                    asyncState.Complete(false, exception);
                }
示例#3
0
                private static void OnReadPreambleAck(object state)
                {
                    bool flag;

                    Microsoft.ServiceBus.Channels.StreamedFramingRequestChannel.StreamedConnectionPoolHelper.SendPreambleAsyncResult sendPreambleAsyncResult = (Microsoft.ServiceBus.Channels.StreamedFramingRequestChannel.StreamedConnectionPoolHelper.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);
                    }
                }
示例#4
0
 public static Microsoft.ServiceBus.Channels.IConnection End(IAsyncResult result, out SecurityMessageProperty remoteSecurity)
 {
     Microsoft.ServiceBus.Channels.StreamedFramingRequestChannel.StreamedConnectionPoolHelper.SendPreambleAsyncResult sendPreambleAsyncResult = AsyncResult.End <Microsoft.ServiceBus.Channels.StreamedFramingRequestChannel.StreamedConnectionPoolHelper.SendPreambleAsyncResult>(result);
     remoteSecurity = sendPreambleAsyncResult.remoteSecurity;
     return(sendPreambleAsyncResult.connection);
 }