public Task CollectAsync(IUserNotification notification, string channel, ProcessStatus status) { Guard.NotNull(notification, nameof(notification)); Guard.NotNullOrEmpty(channel, nameof(channel)); var counterMap = CounterMap.ForChannel(channel, status); var counterKey = CounterKey.ForNotification(notification); return(StoreCountersAsync(counterKey, counterMap)); }
public Task CollectAsync(IUserNotification notification, string channel, ProcessStatus status, CancellationToken ct = default) { Guard.NotNull(notification); Guard.NotNullOrEmpty(channel); var counterMap = CounterMap.ForChannel(channel, status); var counterKey = CounterKey.ForNotification(notification); return(StoreCountersAsync(counterKey, counterMap, ct)); }
public Task CollectAndUpdateAsync(IUserNotification notification, string channel, ProcessStatus status, string?detail) { Guard.NotNull(notification, nameof(notification)); Guard.NotNullOrEmpty(channel, nameof(channel)); var counterMap = CounterMap.ForChannel(channel, status); var counterKey = CounterKey.ForNotification(notification); return(Task.WhenAll( StoreCountersAsync(counterKey, counterMap), StoreInternalAsync(notification.Id, channel, status, detail))); }
public Task CollectAndUpdateAsync(IUserNotification notification, string channel, string configuration, ProcessStatus status, string?detail = null, CancellationToken ct = default) { Guard.NotNull(notification); Guard.NotNullOrEmpty(channel); var counterMap = CounterMap.ForChannel(channel, status); var counterKey = CounterKey.ForNotification(notification); return(Task.WhenAll( StoreCountersAsync(counterKey, counterMap, ct), StoreInternalAsync(notification.Id, channel, configuration, status, detail))); }