public bool TryReceive(TimeSpan timeout, out Message message)
 {
     AmqpChannelListener.AmqpInputSessionChannel.TryReceiveAsyncResult tryReceiveAsyncResult = new AmqpChannelListener.AmqpInputSessionChannel.TryReceiveAsyncResult(this, timeout, null, null);
     tryReceiveAsyncResult.RunSynchronously();
     message = tryReceiveAsyncResult.Message;
     return(tryReceiveAsyncResult.Outcome);
 }
 public Message Receive(TimeSpan timeout)
 {
     AmqpChannelListener.AmqpInputSessionChannel.TryReceiveAsyncResult tryReceiveAsyncResult = new AmqpChannelListener.AmqpInputSessionChannel.TryReceiveAsyncResult(this, timeout, null, null);
     tryReceiveAsyncResult.RunSynchronously();
     if (!tryReceiveAsyncResult.Outcome)
     {
         throw new TimeoutException(SRCore.TimeoutOnOperation(timeout));
     }
     return(tryReceiveAsyncResult.Message);
 }