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(); } }
protected override void OnOpen(TimeSpan timeout) { // check and freeze security properties now AmqpSecurityMode mode = AmqpSecurityMode.None; if (this.bindingElement.BindingSecurity != null) { mode = bindingElement.BindingSecurity.Mode; } this.channelProperties.AmqpSecurityMode = mode; if (mode == AmqpSecurityMode.None) { return; } AmqpChannelHelpers.FindAuthenticationCredentials(this.channelProperties, this.bindingContext); }