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
ActiveToastsIReadOnlyList<ToastInfo>The currently visible toasts.
TotalShownintThe cumulative count of toasts shown since creation.
TotalDismissedintThe cumulative count of toasts dismissed since creation.
Properties
ActiveCount
Gets the number of currently active toasts.
public int ActiveCount { get; }
Property Value
ActiveToasts
The currently visible toasts.
public IReadOnlyList<ToastInfo> ActiveToasts { get; init; }
Property Value
Empty
Gets an empty state with no active toasts and zero counters.
public static ToastState Empty { get; }
Property Value
HasToasts
Gets a value indicating whether any toasts are currently active.
public bool HasToasts { get; }
Property Value
TotalDismissed
The cumulative count of toasts dismissed since creation.
public int TotalDismissed { get; init; }
Property Value
TotalShown
The cumulative count of toasts shown since creation.
public int TotalShown { get; init; }