protected override IAsyncResult OnConnectionBeginSendMessage(Message message, TimeSpan timeout, AsyncCallback callback, object state)
 {
     ReliableBinderSendAsyncResult result = new ReliableBinderSendAsyncResult(callback, state) {
         Binder = base.Binder,
         MaskingMode = MaskingMode.Unhandled,
         Message = message
     };
     result.Begin(timeout);
     return result;
 }
        protected override IAsyncResult OnConnectionBeginSendMessage(Message message, TimeSpan timeout,
                                                                     AsyncCallback callback, object state)
        {
            ReliableBinderSendAsyncResult sendResult = new ReliableBinderSendAsyncResult(callback, state);

            sendResult.Binder      = this.Binder;
            sendResult.MaskingMode = MaskingMode.Unhandled;
            sendResult.Message     = message;
            sendResult.Begin(timeout);

            return(sendResult);
        }
        protected override void OnConnectionEndSend(IAsyncResult result)
        {
            Exception handledException;

            ReliableBinderSendAsyncResult.End(result, out handledException);
            ReliableBinderSendAsyncResult sendResult = (ReliableBinderSendAsyncResult)result;

            if (sendResult.MessageAttemptInfo.RetryCount == this.Settings.MaxRetryCount)
            {
                this.MaxRetryCountException = handledException;
            }
        }
        protected override void OnConnectionEndSend(IAsyncResult result)
        {
            Exception exception;

            ReliableBinderSendAsyncResult.End(result, out exception);
            ReliableBinderSendAsyncResult result2 = (ReliableBinderSendAsyncResult)result;

            if (result2.MessageAttemptInfo.RetryCount == base.Settings.MaxRetryCount)
            {
                base.MaxRetryCountException = exception;
            }
        }
        protected override IAsyncResult OnConnectionBeginSendMessage(Message message, TimeSpan timeout, AsyncCallback callback, object state)
        {
            ReliableBinderSendAsyncResult result = new ReliableBinderSendAsyncResult(callback, state)
            {
                Binder      = base.Binder,
                MaskingMode = MaskingMode.Unhandled,
                Message     = message
            };

            result.Begin(timeout);
            return(result);
        }
 protected override IAsyncResult OnConnectionBeginSend(MessageAttemptInfo attemptInfo, TimeSpan timeout, bool maskUnhandledException, AsyncCallback callback, object state)
 {
     ReliableBinderSendAsyncResult result = new ReliableBinderSendAsyncResult(callback, state) {
         Binder = base.Binder,
         MessageAttemptInfo = attemptInfo,
         MaskingMode = maskUnhandledException ? MaskingMode.Unhandled : MaskingMode.None
     };
     if (attemptInfo.RetryCount < base.Settings.MaxRetryCount)
     {
         result.MaskingMode |= MaskingMode.Handled;
         result.SaveHandledException = false;
     }
     else
     {
         result.SaveHandledException = true;
     }
     result.Begin(timeout);
     return result;
 }
        protected override IAsyncResult OnConnectionBeginSend(MessageAttemptInfo attemptInfo, TimeSpan timeout, bool maskUnhandledException, AsyncCallback callback, object state)
        {
            ReliableBinderSendAsyncResult result = new ReliableBinderSendAsyncResult(callback, state)
            {
                Binder             = base.Binder,
                MessageAttemptInfo = attemptInfo,
                MaskingMode        = maskUnhandledException ? MaskingMode.Unhandled : MaskingMode.None
            };

            if (attemptInfo.RetryCount < base.Settings.MaxRetryCount)
            {
                result.MaskingMode         |= MaskingMode.Handled;
                result.SaveHandledException = false;
            }
            else
            {
                result.SaveHandledException = true;
            }
            result.Begin(timeout);
            return(result);
        }
 protected override void OnConnectionEndSendMessage(IAsyncResult result)
 {
     ReliableBinderSendAsyncResult.End(result);
 }
        public static void End(IAsyncResult result, out Exception handledException)
        {
            ReliableBinderSendAsyncResult result2 = AsyncResult.End <ReliableBinderSendAsyncResult>(result);

            handledException = result2.HandledException;
        }