Class NotificationCenter
- Namespace
- BlazOrbit.Notifications
- Assembly
- BlazOrbit.Notifications.dll
Default INotificationCenter implementation.
public sealed class NotificationCenter : INotificationCenter
- Inheritance
-
objectNotificationCenter
- Implements
Constructors
NotificationCenter(INotificationStore)
Initializes a new NotificationCenter.
public NotificationCenter(INotificationStore store)
Parameters
storeINotificationStore
Properties
All
Snapshot of the inbox, newest first.
public IReadOnlyList<BOBNotification> All { get; }
Property Value
- IReadOnlyList<BOBNotification>
UnreadCount
public int UnreadCount { get; }
Property Value
- int
Methods
ClearAsync()
Empties the inbox.
public Task ClearAsync()
Returns
- Task
MarkAllReadAsync()
Marks every entry as read.
public Task MarkAllReadAsync()
Returns
- Task
MarkReadAsync(string)
Marks a single entry as read.
public Task MarkReadAsync(string id)
Parameters
idstring
Returns
- Task
PushAsync(BOBNotification)
Pushes a new entry into the inbox and notifies subscribers.
public Task PushAsync(BOBNotification notification)
Parameters
notificationBOBNotification
Returns
- Task
RemoveAsync(string)
Removes a single entry from the inbox.
public Task RemoveAsync(string id)
Parameters
idstring
Returns
- Task
Events
OnChangeAsync
Raised whenever the inbox content changes (push / mark-read / remove / clear).
public event Func<Task>? OnChangeAsync
Event Type
- Func<Task>