Interface INotificationCenter
- Namespace
- BlazOrbit.Notifications
- Assembly
- BlazOrbit.Notifications.dll
Persistent inbox-style notification service. Pairs with BOBNotificationBell for
the unread badge and any consumer-supplied UI (drawer, panel, popover) for the list.
public interface INotificationCenter
Remarks
Storage is delegated to INotificationStore. The default registration uses
InMemoryNotificationStore; pass a custom implementation to
AddBlazOrbitNotifications to persist across reloads.
Properties
All
Snapshot of the inbox, newest first.
IReadOnlyList<BOBNotification> All { get; }
Property Value
- IReadOnlyList<BOBNotification>
UnreadCount
int UnreadCount { get; }
Property Value
- int
Methods
ClearAsync()
Empties the inbox.
Task ClearAsync()
Returns
- Task
MarkAllReadAsync()
Marks every entry as read.
Task MarkAllReadAsync()
Returns
- Task
MarkReadAsync(string)
Marks a single entry as read.
Task MarkReadAsync(string id)
Parameters
idstring
Returns
- Task
PushAsync(BOBNotification)
Pushes a new entry into the inbox and notifies subscribers.
Task PushAsync(BOBNotification notification)
Parameters
notificationBOBNotification
Returns
- Task
RemoveAsync(string)
Removes a single entry from the inbox.
Task RemoveAsync(string id)
Parameters
idstring
Returns
- Task
Events
OnChangeAsync
Raised whenever the inbox content changes (push / mark-read / remove / clear).
event Func<Task>? OnChangeAsync
Event Type
- Func<Task>