Table of Contents

Class NotificationCenter

Namespace
BlazOrbit.Notifications
Assembly
BlazOrbit.Notifications.dll

Default INotificationCenter implementation.

public sealed class NotificationCenter : INotificationCenter
Inheritance
object
NotificationCenter
Implements

Constructors

NotificationCenter(INotificationStore)

Initializes a new NotificationCenter.

public NotificationCenter(INotificationStore store)

Parameters

store INotificationStore

Properties

All

Snapshot of the inbox, newest first.

public IReadOnlyList<BOBNotification> All { get; }

Property Value

IReadOnlyList<BOBNotification>

UnreadCount

Count of entries with IsRead = false.

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

id string

Returns

Task

PushAsync(BOBNotification)

Pushes a new entry into the inbox and notifies subscribers.

public Task PushAsync(BOBNotification notification)

Parameters

notification BOBNotification

Returns

Task

RemoveAsync(string)

Removes a single entry from the inbox.

public Task RemoveAsync(string id)

Parameters

id string

Returns

Task

Events

OnChangeAsync

Raised whenever the inbox content changes (push / mark-read / remove / clear).

public event Func<Task>? OnChangeAsync

Event Type

Func<Task>