Ejemplo n.º 1
0
        internal static async Task <RequestContext> HelpReceiveRequestAsync(IReplyChannel channel, CancellationToken token)
        {
            var result = await channel.TryReceiveRequestAsync(token);

            if (result.Success)
            {
                return(result.Result);
            }
            else
            {
                // TODO: Fix timeout value
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(
                          ReplyChannel.CreateReceiveRequestTimedOutException(channel, TimeSpan.Zero));
            }
        }
Ejemplo n.º 2
0
 public Task <TryAsyncResult <RequestContext> > TryReceiveAsync(CancellationToken token)
 {
     return(channel.TryReceiveRequestAsync(token));
 }