Example #1
0
            private static void OnWriteMessage(IAsyncResult result)
            {
                bool flag;

                if (result.CompletedSynchronously)
                {
                    return;
                }
                Microsoft.ServiceBus.Channels.StreamedFramingRequestChannel.StreamedFramingAsyncRequest asyncState = (Microsoft.ServiceBus.Channels.StreamedFramingRequestChannel.StreamedFramingAsyncRequest)result.AsyncState;
                Exception exception = null;
                bool      flag1     = true;

                try
                {
                    try
                    {
                        flag  = asyncState.HandleWriteMessage(result);
                        flag1 = false;
                    }
                    catch (Exception exception2)
                    {
                        Exception exception1 = exception2;
                        if (Fx.IsFatal(exception1))
                        {
                            throw;
                        }
                        flag      = true;
                        exception = exception1;
                    }
                }
                finally
                {
                    if (flag1)
                    {
                        asyncState.Cleanup();
                    }
                }
                if (flag)
                {
                    asyncState.Complete(false, exception);
                }
            }
Example #2
0
            private static void OnReceiveReply(IAsyncResult result)
            {
                bool flag;

                Microsoft.ServiceBus.Channels.StreamedFramingRequestChannel.StreamedFramingAsyncRequest asyncState = (Microsoft.ServiceBus.Channels.StreamedFramingRequestChannel.StreamedFramingAsyncRequest)result.AsyncState;
                Exception exception = null;
                bool      flag1     = true;

                try
                {
                    try
                    {
                        flag  = asyncState.CompleteReceiveReply(result);
                        flag1 = false;
                    }
                    catch (Exception exception2)
                    {
                        Exception exception1 = exception2;
                        if (Fx.IsFatal(exception1))
                        {
                            throw;
                        }
                        flag      = true;
                        exception = exception1;
                    }
                }
                finally
                {
                    if (flag1)
                    {
                        asyncState.Cleanup();
                    }
                }
                if (flag)
                {
                    asyncState.Complete(false, exception);
                }
            }