public async Task <AmqpIotOutcome> SendMethodResponseAsync(MethodResponseInternal methodResponse, TimeSpan timeout) { Logging.Enter(this, methodResponse, nameof(SendMethodResponseAsync)); await EnableMethodsAsync(timeout).ConfigureAwait(false); Debug.Assert(_methodSendingLink != null); try { return(await _methodSendingLink.SendMethodResponseAsync(methodResponse, timeout).ConfigureAwait(false)); } finally { Logging.Exit(this, methodResponse, nameof(SendMethodResponseAsync)); } }
public async Task <AmqpIotOutcome> SendMethodResponseAsync(MethodResponseInternal methodResponse, CancellationToken cancellationToken) { if (Logging.IsEnabled) { Logging.Enter(this, methodResponse, nameof(SendMethodResponseAsync)); } await EnableMethodsAsync(cancellationToken).ConfigureAwait(false); Debug.Assert(_methodSendingLink != null); try { return(await _methodSendingLink.SendMethodResponseAsync(methodResponse, cancellationToken).ConfigureAwait(false)); } finally { if (Logging.IsEnabled) { Logging.Exit(this, methodResponse, nameof(SendMethodResponseAsync)); } } }