Table of Contents

Class ToastState

Namespace
BlazOrbit.Components.Layout.Services
Assembly
BlazOrbit.dll

Runtime state for a single toast tracked by IToastService.

public sealed class ToastState
Inheritance
object
ToastState

Constructors

ToastState()

Initializes a new toast state and stamps StartedAt with the current UTC time.

public ToastState()

Properties

Content

Render fragment displayed inside the toast body.

public required RenderFragment Content { get; init; }

Property Value

RenderFragment

CreatedAt

Timestamp captured at construction.

public DateTime CreatedAt { get; }

Property Value

DateTime

DismissTokenSource

Cancellation source backing the auto-dismiss timer.

public CancellationTokenSource? DismissTokenSource { get; set; }

Property Value

CancellationTokenSource

ElapsedBeforePause

Total elapsed time accumulated across pause/resume cycles.

public TimeSpan ElapsedBeforePause { get; set; }

Property Value

TimeSpan

Id

Stable identifier for the toast.

public Guid Id { get; }

Property Value

Guid

IsClosing

true while the closing animation is running.

public bool IsClosing { get; set; }

Property Value

bool

IsPaused

true when the auto-dismiss timer is paused.

public bool IsPaused { get; set; }

Property Value

bool

Options

Options describing duration, position, and animation.

public required ToastOptions Options { get; init; }

Property Value

ToastOptions

ProgressPercentage

Auto-dismiss progress in percent (0–100); 0 when auto-dismiss is disabled.

public double ProgressPercentage { get; }

Property Value

double

RemainingTime

Time remaining until the toast auto-dismisses; System.TimeSpan.Zero when auto-dismiss is off.

public TimeSpan RemainingTime { get; }

Property Value

TimeSpan

StartedAt

Timestamp at which the current visible interval started; reset on resume.

public DateTime StartedAt { get; set; }

Property Value

DateTime