Ejemplo n.º 1
0
            private static void OnCloseOutputSession(IAsyncResult result)
            {
                if (result.CompletedSynchronously)
                {
                    return;
                }
                Microsoft.ServiceBus.Channels.FramingDuplexSessionChannel.CloseAsyncResult asyncState = (Microsoft.ServiceBus.Channels.FramingDuplexSessionChannel.CloseAsyncResult)result.AsyncState;
                bool      flag      = false;
                Exception exception = null;

                try
                {
                    flag = asyncState.HandleCloseOutputSession(result, false);
                }
                catch (Exception exception2)
                {
                    Exception exception1 = exception2;
                    if (Fx.IsFatal(exception1))
                    {
                        throw;
                    }
                    flag      = true;
                    exception = exception1;
                }
                if (flag)
                {
                    asyncState.Complete(false, exception);
                }
            }
Ejemplo n.º 2
0
            private static void OnCompleteCloseScheduled(object state)
            {
                Microsoft.ServiceBus.Channels.FramingDuplexSessionChannel.CloseAsyncResult closeAsyncResult = (Microsoft.ServiceBus.Channels.FramingDuplexSessionChannel.CloseAsyncResult)state;
                Exception exception = null;

                try
                {
                    closeAsyncResult.OnCompleteCloseScheduled();
                }
                catch (Exception exception2)
                {
                    Exception exception1 = exception2;
                    if (Fx.IsFatal(exception1))
                    {
                        throw;
                    }
                    exception = exception1;
                }
                closeAsyncResult.Complete(false, exception);
            }