Interface INotificationStore
- Namespace
- MailFathom.Application.Notifications
- Assembly
- MailFathom.Application.dll
Keeps what happened to a person while nobody was looking at their screen.
public interface INotificationStore
Remarks
Every producer raises through this port rather than writing to the table, which is what makes the deduplication rule one rule: a stage that composed its own insert would decide for itself whether a condition had already been said, and two producers deciding that separately is how a notification centre starts repeating itself.
Methods
- CountUnreadAsync(UserId, CancellationToken)
Counts one user's notifications that have not been read.
- EraseAsync(UserId, IReadOnlyCollection<NotificationId>, CancellationToken)
Erases the named notifications, of those the given user holds.
- EraseOccurredBeforeAsync(UserId, DateTimeOffset, int, CancellationToken)
Erases up to a bounded number of one user's notifications that describe something older than a given instant.
- MarkAllReadAsync(UserId, CancellationToken)
Marks every one of a user's unread notifications read.
- ReadPageAsync(UserId, NotificationCursor?, int, CancellationToken)
Reads one bounded page of a user's notifications, newest first.
- RecordAsync(Notification, CancellationToken)
Records one notification unless the condition it names is already standing unread.
- SetReadAsync(UserId, NotificationId, bool, CancellationToken)
Puts one of a user's notifications into a stated read state.