Beispiel #1
0
 private void HandleReceiveRequestComplete(IAsyncResult result)
 {
     if (!this.channel.EndTryReceiveRequest(result, out this.requestContext))
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(ReplyChannel.CreateReceiveRequestTimedOutException(this.channel, this.timeout));
     }
 }
Beispiel #2
0
        internal static RequestContext HelpReceiveRequest(IReplyChannel channel, TimeSpan timeout)
        {
            RequestContext requestContext;

            if (channel.TryReceiveRequest(timeout, out requestContext))
            {
                return(requestContext);
            }
            else
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(
                          ReplyChannel.CreateReceiveRequestTimedOutException(channel, timeout));
            }
        }