public TaskSlim BasicPublishWithConfirmation(string exchange, string routingKey, bool mandatory, BasicProperties properties, ArraySegment <byte> buffer) { EnsureOpen(); if (_confirmationKeeper == null) { throw new Exception("This channel is not set up for confirmations"); } return(_io.__BasicPublishConfirm(exchange, routingKey, mandatory, properties, buffer)); }
public async Task BasicPublishWithConfirmation(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 not set up for confirmations"); } await WaitIfChannelBlockAndSwitchThreadIfNeeded(); await _io.__BasicPublishConfirm(exchange, routingKey, mandatory, properties, buffer); }