Esempio n. 1
0
        public IAsyncResult BeginSend(Message message, TimeSpan timeout, AsyncCallback callback, object state)
        {
            this.ThrowIfDisposedOrNotOpen();
            AmqpChannelHelpers.ValidateTimeout(timeout);

            try
            {
                using (AmqpMessage amqpMessage = this.WcfToQpid(message))
                {
                    return(this.outputLink.BeginSend(amqpMessage, timeout, callback, state));
                }
            }
            finally
            {
                message.Close();
            }
        }
Esempio n. 2
0
        public void Send(Message message, TimeSpan timeout)
        {
            this.ThrowIfDisposedOrNotOpen();
            AmqpChannelHelpers.ValidateTimeout(timeout);

            try
            {
                using (AmqpMessage amqpMessage = this.WcfToQpid(message))
                {
                    this.outputLink.Send(amqpMessage, timeout);
                }
            }
            finally
            {
                message.Close();
            }
        }