private void SetupPendingEvents(IWebhookEventEntity @event) { A.CallTo(() => webhookEventRepository.QueryPendingAsync(A <Func <IWebhookEventEntity, Task> > .Ignored, A <CancellationToken> .Ignored)) .Invokes(async(Func <IWebhookEventEntity, Task> callback, CancellationToken ct) => { await callback(@event); }); }
private async Task QueryAsync(CancellationToken cancellationToken) { try { await webhookEventRepository.QueryPendingAsync(blockBlock.SendAsync, cancellationToken); } catch (Exception ex) { log.LogError(ex, w => w .WriteProperty("action", "QueueWebhookEvents") .WriteProperty("status", "Failed")); } }