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(); } }
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(); } }