Class ToastQueue
- Namespace
- MiniTui
- Assembly
- MiniTui.dll
Short messages that pop up in the top-right corner and disappear on their own. Draw them with Toasts(). Thread-safe.
[SuppressMessage("Naming", "CA1711:Identifiers should not have incorrect suffix", Justification = "Name from the spec (§8.3); it is a queue of toasts.")]
public sealed class ToastQueue
- Inheritance
-
ToastQueue
- Inherited Members
Constructors
ToastQueue()
Create a queue that uses the app's clock.
public ToastQueue()
ToastQueue(TimeProvider)
Create a queue that uses time, for example a fake clock in tests.
public ToastQueue(TimeProvider time)
Parameters
timeTimeProvider
Properties
Count
The toasts waiting or showing.
public int Count { get; }
Property Value
Methods
Clear()
Remove all toasts.
public void Clear()
Push(string, ToastLevel, TimeSpan?)
Add a toast. Up to three show at a time; the rest wait. Each one shows for duration
(default 4 seconds) from when it first appears.
public void Push(string text, ToastLevel level = ToastLevel.Info, TimeSpan? duration = null)
Parameters
textstringlevelToastLeveldurationTimeSpan?