Table of Contents

Class ToastState

Namespace
SharpConsoleUI.Core
Assembly
SharpConsoleUI.dll

Immutable snapshot of the toast subsystem state.

public record ToastState : IEquatable<ToastState>
Inheritance
ToastState
Implements
Inherited Members
Extension Methods

Constructors

ToastState(IReadOnlyList<ToastInfo>, int, int)

Immutable snapshot of the toast subsystem state.

public ToastState(IReadOnlyList<ToastInfo> ActiveToasts, int TotalShown, int TotalDismissed)

Parameters

ActiveToasts IReadOnlyList<ToastInfo>

The currently visible toasts.

TotalShown int

The cumulative count of toasts shown since creation.

TotalDismissed int

The cumulative count of toasts dismissed since creation.

Properties

ActiveCount

Gets the number of currently active toasts.

public int ActiveCount { get; }

Property Value

int

ActiveToasts

The currently visible toasts.

public IReadOnlyList<ToastInfo> ActiveToasts { get; init; }

Property Value

IReadOnlyList<ToastInfo>

Empty

Gets an empty state with no active toasts and zero counters.

public static ToastState Empty { get; }

Property Value

ToastState

HasToasts

Gets a value indicating whether any toasts are currently active.

public bool HasToasts { get; }

Property Value

bool

TotalDismissed

The cumulative count of toasts dismissed since creation.

public int TotalDismissed { get; init; }

Property Value

int

TotalShown

The cumulative count of toasts shown since creation.

public int TotalShown { get; init; }

Property Value

int