internal void EndWaitForChannel(IAsyncResult result)
        {
            WaitCompletedAsyncResult result2 = result as WaitCompletedAsyncResult;

            if (result2 != null)
            {
                CompletedAsyncResult.End(result2);
            }
            else
            {
                try
                {
                    this.binder.Listener.EndWaitForChannel(result);
                }
                catch (CommunicationObjectAbortedException)
                {
                }
                catch (CommunicationObjectFaultedException)
                {
                }
                catch (CommunicationException exception)
                {
                    this.HandleError(exception);
                }
                catch (Exception exception2)
                {
                    if (Fx.IsFatal(exception2))
                    {
                        throw;
                    }
                    this.HandleErrorOrAbort(exception2);
                }
            }
        }
Example #2
0
        internal void EndWaitForMessage(IAsyncResult result)
        {
            WaitCompletedAsyncResult handlerResult = result as WaitCompletedAsyncResult;

            if (handlerResult != null)
            {
                WaitCompletedAsyncResult.End(handlerResult);
            }
            else
            {
                try
                {
                    this.binder.EndWaitForMessage(result);
                }
                catch (CommunicationObjectAbortedException) { }
                catch (CommunicationObjectFaultedException) { }
                catch (CommunicationException e)
                {
                    this.HandleError(e);
                }
                catch (Exception e)
                {
                    if (Fx.IsFatal(e))
                    {
                        throw;
                    }
                    this.HandleErrorOrAbort(e);
                }
            }
        }