ValidateTimeout() static private method

static private ValidateTimeout ( System.TimeSpan timeout ) : void
timeout System.TimeSpan
return void
コード例 #1
0
        protected override IAsyncResult OnBeginAcceptChannel(TimeSpan timeout, AsyncCallback callback, object state)
        {
            UdpChannelHelpers.ValidateTimeout(timeout);
            if (!this.IsDisposed)
            {
                this.EnsureChannelAvailable();
            }

            return(this.channelQueue.BeginDequeue(timeout, callback, state));
        }
コード例 #2
0
        //Synchronously returns a channel that is attached to this listener.
        protected override IInputChannel OnAcceptChannel(TimeSpan timeout)
        {
            UdpChannelHelpers.ValidateTimeout(timeout);
            if (!this.IsDisposed)
            {
                this.EnsureChannelAvailable();
            }

            IInputChannel channel;

            if (this.channelQueue.Dequeue(timeout, out channel))
            {
                return(channel);
            }
            else
            {
                throw CreateAcceptTimeoutException(timeout);
            }
        }
コード例 #3
0
 protected override IAsyncResult OnBeginWaitForChannel(TimeSpan timeout, AsyncCallback callback, object state)
 {
     UdpChannelHelpers.ValidateTimeout(timeout);
     return(this.channelQueue.BeginWaitForItem(timeout, callback, state));
 }
コード例 #4
0
 protected override bool OnWaitForChannel(TimeSpan timeout)
 {
     UdpChannelHelpers.ValidateTimeout(timeout);
     return(this.channelQueue.WaitForItem(timeout));
 }
コード例 #5
0
 public IAsyncResult BeginWaitForMessage(TimeSpan timeout, AsyncCallback callback, object state)
 {
     UdpChannelHelpers.ValidateTimeout(timeout);
     return(this.messageQueue.BeginWaitForItem(timeout, callback, state));
 }
コード例 #6
0
 public bool WaitForMessage(TimeSpan timeout)
 {
     UdpChannelHelpers.ValidateTimeout(timeout);
     return(this.messageQueue.WaitForItem(timeout));
 }
コード例 #7
0
 public IAsyncResult BeginTryReceive(TimeSpan timeout, AsyncCallback callback, object state)
 {
     UdpChannelHelpers.ValidateTimeout(timeout);
     return(this.messageQueue.BeginDequeue(timeout, callback, state));
 }
コード例 #8
0
 public bool TryReceive(TimeSpan timeout, out Message message)
 {
     UdpChannelHelpers.ValidateTimeout(timeout);
     return(this.messageQueue.Dequeue(timeout, out message));
 }