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);
 }
            bool System.ServiceModel.Channels.IInputChannel.EndTryReceive(IAsyncResult result, out Message message)
            {
                AmqpChannelListener.AmqpInputSessionChannel.TryReceiveAsyncResult tryReceiveAsyncResult = AsyncResult <AmqpChannelListener.AmqpInputSessionChannel.TryReceiveAsyncResult> .End(result);

                message = tryReceiveAsyncResult.Message;
                return(tryReceiveAsyncResult.Outcome);
            }
            Message System.ServiceModel.Channels.IInputChannel.EndReceive(IAsyncResult result)
            {
                AmqpChannelListener.AmqpInputSessionChannel.TryReceiveAsyncResult tryReceiveAsyncResult = AsyncResult <AmqpChannelListener.AmqpInputSessionChannel.TryReceiveAsyncResult> .End(result);

                if (!tryReceiveAsyncResult.Outcome)
                {
                    throw new TimeoutException(SRCore.TimeoutOnOperation(tryReceiveAsyncResult.OriginalTimeout));
                }
                return(tryReceiveAsyncResult.Message);
            }
 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);
 }