public TaskSlim BasicPublish(string exchange, string routingKey, bool mandatory, BasicProperties properties, ArraySegment <byte> buffer) { EnsureOpen(); if (_confirmationKeeper != null) { throw new Exception("This channel is set up for confirmations, call BasicPublishWithConfirmation instead"); } return(_io.__BasicPublishTask(exchange, routingKey, mandatory, properties, buffer)); }
public async Task BasicPublish(string exchange, string routingKey, bool mandatory, BasicProperties properties, ArraySegment <byte> buffer) { if (exchange == null) { throw new ArgumentNullException("exchange"); } if (routingKey == null) { throw new ArgumentNullException("routingKey"); } EnsureOpen(); if (_confirmationKeeper != null) { throw new Exception("This channel is set up for confirmations, call BasicPublishWithConfirmation instead"); } await WaitIfChannelBlockAndSwitchThreadIfNeeded(); await _io.__BasicPublishTask(exchange, routingKey, mandatory, properties, buffer); }