public async Task TearDown() { if (returnedLockTokens != null && returnedLockTokens.Any()) { await queueClient.CompleteBatchAsync(returnedLockTokens); } if (forwardedMessages != null && forwardedMessages.Any()) { await queueClient.CompleteBatchAsync(forwardedMessages.Select(x => x.LockToken)); } }
public Task CompleteMessages(Guid[] lockTokens) { if (lockTokens.Any()) { return(client.CompleteBatchAsync(lockTokens)); } return(Task.CompletedTask); }