Table of Contents

Class NotificationState

Namespace
SharpConsoleUI.Core
Assembly
SharpConsoleUI.dll

Represents the current notification system state.

public record NotificationState : IEquatable<NotificationState>
Inheritance
NotificationState
Implements
Inherited Members

Constructors

NotificationState(IReadOnlyList<NotificationInfo>, int, int)

Represents the current notification system state.

public NotificationState(IReadOnlyList<NotificationInfo> ActiveNotifications, int TotalShown, int TotalDismissed)

Parameters

ActiveNotifications IReadOnlyList<NotificationInfo>

The list of currently active notifications.

TotalShown int

The total number of notifications shown since service creation.

TotalDismissed int

The total number of notifications dismissed since service creation.

Properties

ActiveCount

Gets the number of active notifications.

public int ActiveCount { get; }

Property Value

int

ActiveNotifications

The list of currently active notifications.

public IReadOnlyList<NotificationInfo> ActiveNotifications { get; init; }

Property Value

IReadOnlyList<NotificationInfo>

Empty

Gets an empty notification state.

public static NotificationState Empty { get; }

Property Value

NotificationState

HasNotifications

Gets a value indicating whether there are any active notifications.

public bool HasNotifications { get; }

Property Value

bool

TotalDismissed

The total number of notifications dismissed since service creation.

public int TotalDismissed { get; init; }

Property Value

int

TotalShown

The total number of notifications shown since service creation.

public int TotalShown { get; init; }

Property Value

int