Class InMemoryNotificationStore
- Namespace
- BlazOrbit.Notifications
- Assembly
- BlazOrbit.Notifications.dll
Default INotificationStore implementation - purely in-memory, scoped per circuit / page. State evaporates on full page reload; consumers wanting persistence supply their own implementation.
public sealed class InMemoryNotificationStore : INotificationStore
- Inheritance
-
objectInMemoryNotificationStore
- Implements
Constructors
InMemoryNotificationStore()
public InMemoryNotificationStore()
Methods
Add(BOBNotification)
Persists a new entry.
public void Add(BOBNotification notification)
Parameters
notificationBOBNotification
All()
Snapshot of every stored notification, newest first.
public IReadOnlyList<BOBNotification> All()
Returns
- IReadOnlyList<BOBNotification>
Clear()
Removes every entry.
public void Clear()
MarkAllRead()
Marks every entry as read.
public void MarkAllRead()
MarkRead(string)
Marks an entry as read by id; returns true when found.
public bool MarkRead(string id)
Parameters
idstring
Returns
- bool
Remove(string)
Removes a single entry; returns true when found.
public bool Remove(string id)
Parameters
idstring
Returns
- bool