public override async Task SendEventAsync(Message message, CancellationToken cancellationToken) { if (Logging.IsEnabled) { Logging.Enter(this, message, cancellationToken, $"{nameof(SendEventAsync)}"); } try { cancellationToken.ThrowIfCancellationRequested(); AmqpIoTOutcome amqpIoTOutcome = await _amqpUnit.SendEventAsync(message, _operationTimeout).ConfigureAwait(false); if (amqpIoTOutcome != null) { amqpIoTOutcome.ThrowIfNotAccepted(); } } finally { if (Logging.IsEnabled) { Logging.Exit(this, message, cancellationToken, $"{nameof(SendEventAsync)}"); } } }
public override async Task SendMethodResponseAsync(MethodResponseInternal methodResponse, CancellationToken cancellationToken) { Logging.Enter(this, methodResponse, cancellationToken, $"{nameof(SendMethodResponseAsync)}"); try { cancellationToken.ThrowIfCancellationRequested(); AmqpIoTOutcome amqpIoTOutcome = await _amqpUnit.SendMethodResponseAsync(methodResponse, _operationTimeout).ConfigureAwait(false); if (amqpIoTOutcome != null) { amqpIoTOutcome.ThrowIfNotAccepted(); } } finally { Logging.Exit(this, methodResponse, cancellationToken, $"{nameof(SendMethodResponseAsync)}"); } }