public IAsyncResult BeginReceive(TimeSpan timeout, AsyncCallback callback, object state)
 {
     using (MsmqDiagnostics.BoundReceiveOperation(this.receiver))
     {
         return(InputChannel.HelpBeginReceive(this, timeout, callback, state));
     }
 }
 private void HandleReceiveComplete(IAsyncResult result)
 {
     if (!this.channel.EndTryReceive(result, out this.message))
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(InputChannel.CreateReceiveTimedOutException(this.channel, this.timeout));
     }
 }
            public Message EndReceive(IAsyncResult result)
            {
#if FEATURE_CORECLR
                throw new NotImplementedException("InputChannel not supported in .NET Core");
#else
                return(InputChannel.HelpEndReceive(result));
#endif
            }
            public IAsyncResult BeginReceive(TimeSpan timeout, AsyncCallback callback, object state)
            {
#if FEATURE_CORECLR
                throw new NotImplementedException("InputChannel not supported in .NET Core");
#else
                return(InputChannel.HelpBeginReceive((IInputChannel)this, timeout, callback, state));
#endif
            }
            public Message Receive(TimeSpan timeout)
            {
#if FEATURE_CORECLR
                throw new NotImplementedException("InputChannel not supported in .NET Core");
#else
                return(InputChannel.HelpReceive((IInputChannel)this, timeout));
#endif
            }
Exemple #6
0
 public IAsyncResult BeginReceive(TimeSpan timeout, AsyncCallback callback, object state)
 {
     if (timeout < TimeSpan.Zero)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("timeout", timeout, System.ServiceModel.SR.GetString("SFxTimeoutOutOfRange0")));
     }
     base.ThrowPending();
     return(InputChannel.HelpBeginReceive(this, timeout, callback, state));
 }
Exemple #7
0
 public Message Receive(TimeSpan timeout)
 {
     if (timeout < TimeSpan.Zero)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("timeout", timeout, System.ServiceModel.SR.GetString("SFxTimeoutOutOfRange0")));
     }
     base.ThrowPending();
     return(InputChannel.HelpReceive(this, timeout));
 }
Exemple #8
0
        public Message Receive(TimeSpan timeout)
        {
            if (timeout < TimeSpan.Zero)
            {
                throw FxTrace.Exception.AsError(new ArgumentOutOfRangeException("timeout", timeout, SR.TimeoutOutOfRange0));
            }

            this.ThrowPending();
            return(InputChannel.HelpReceive(this, timeout));
        }
Exemple #9
0
        public IAsyncResult BeginReceive(TimeSpan timeout, AsyncCallback callback, object state)
        {
            if (timeout < TimeSpan.Zero)
            {
                throw FxTrace.Exception.AsError(new ArgumentOutOfRangeException("timeout", timeout, SR.TimeoutOutOfRange0));
            }

            this.ThrowPending();
            return(InputChannel.HelpBeginReceive(this, timeout, callback, state));
        }
Exemple #10
0
        public Task <Message> ReceiveAsync(TimeSpan timeout)
        {
            if (timeout < TimeSpan.Zero)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(
                          new ArgumentOutOfRangeException(nameof(timeout), timeout, SR.SFxTimeoutOutOfRange0));
            }

            this.ThrowPending();
            return(InputChannel.HelpReceiveAsync(this, timeout));
        }
Exemple #11
0
        public virtual Message Receive(TimeSpan timeout)
        {
            if (timeout < TimeSpan.Zero)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(
                          new ArgumentOutOfRangeException("timeout", timeout, SR.GetString(SR.SFxTimeoutOutOfRange0)));
            }

            this.ThrowPending();

            return(InputChannel.HelpReceive(this, timeout));
        }
 public override IAsyncResult BeginReceive(TimeSpan timeout, AsyncCallback callback, object state)
 {
     return(InputChannel.HelpBeginReceive(this, timeout, callback, state));
 }
 public override Message Receive(TimeSpan timeout)
 {
     return(InputChannel.HelpReceive(this, timeout));
 }
Exemple #14
0
 public Message EndReceive(IAsyncResult result)
 {
     return(InputChannel.HelpEndReceive(result));
 }
 public Task <Message> ReceiveAsync(TimeSpan timeout)
 {
     return(InputChannel.HelpReceiveAsync(this, timeout));
 }
 public Message Receive(TimeSpan timeout)
 {
     return InputChannel.HelpReceive(this, timeout);
 }