protected override IAsyncResult OnBeginAcceptChannel(TimeSpan timeout, AsyncCallback callback, object state) { ExtentionHelper.ValidateTimeout(timeout); if (!this.IsDisposed) { this.ensureChannelAvailable(); } return(_ChannelQueue.BeginDequeue(timeout, callback, state)); }
protected override IInputChannel OnAcceptChannel(TimeSpan timeout) { ExtentionHelper.ValidateTimeout(timeout); if (!this.IsDisposed) { this.ensureChannelAvailable(); } IInputChannel channel; if (_ChannelQueue.Dequeue(timeout, out channel)) { return(channel); } else { throw new TimeoutException( string.Format("Accept on listener at address {0} timed out after {1}.", this.Uri.AbsoluteUri, timeout)); } }
protected override IAsyncResult OnBeginWaitForChannel(TimeSpan timeout, AsyncCallback callback, object state) { ExtentionHelper.ValidateTimeout(timeout); return(_ChannelQueue.BeginWaitForItem(timeout, callback, state)); }
protected override bool OnWaitForChannel(TimeSpan timeout) { ExtentionHelper.ValidateTimeout(timeout); return(_ChannelQueue.WaitForItem(timeout)); }
public IAsyncResult BeginWaitForMessage(TimeSpan timeout, AsyncCallback callback, object state) { ExtentionHelper.ValidateTimeout(timeout); return(_MessageQueue.BeginWaitForItem(timeout, callback, state)); }
public IAsyncResult BeginTryReceive(TimeSpan timeout, AsyncCallback callback, object state) { ExtentionHelper.ValidateTimeout(timeout); return(_MessageQueue.BeginDequeue(timeout, callback, state)); }
public bool WaitForMessage(TimeSpan timeout) { ExtentionHelper.ValidateTimeout(timeout); return(_MessageQueue.WaitForItem(timeout)); }
public bool TryReceive(TimeSpan timeout, out Message message) { ExtentionHelper.ValidateTimeout(timeout); return(_MessageQueue.Dequeue(timeout, out message)); }