Interface IToastService
- Namespace
- BlazOrbit.Components.Layout.Services
- Assembly
- BlazOrbit.dll
Coordinates toast notifications shown by BOBToastHost.
public interface IToastService
Properties
ActiveToasts
Currently active toasts.
IReadOnlyList<ToastState> ActiveToasts { get; }
Property Value
- IReadOnlyList<ToastState>
Methods
CloseAllAsync()
Closes every active toast.
Task CloseAllAsync()
Returns
- Task
CloseAsync(Guid)
Closes the toast identified by toastId.
Task CloseAsync(Guid toastId)
Parameters
toastIdGuid
Returns
- Task
PauseAsync(Guid)
Pauses auto-dismiss for the toast identified by toastId.
Task PauseAsync(Guid toastId)
Parameters
toastIdGuid
Returns
- Task
ResumeAsync(Guid)
Resumes auto-dismiss for the toast identified by toastId.
Task ResumeAsync(Guid toastId)
Parameters
toastIdGuid
Returns
- Task
ShowAsync(Action<RenderTreeBuilder>)
Shows a toast whose body is built by the supplied render-tree builder action.
Task ShowAsync(Action<RenderTreeBuilder> builder)
Parameters
builderAction<RenderTreeBuilder>
Returns
- Task
ShowAsync(Action<RenderTreeBuilder>, ToastOptions?)
Shows a toast whose body is built by the supplied builder, with explicit options.
Task ShowAsync(Action<RenderTreeBuilder> builder, ToastOptions? options)
Parameters
builderAction<RenderTreeBuilder>optionsToastOptions
Returns
- Task
ShowAsync<TComponent>()
Shows a toast that renders TComponent.
Task ShowAsync<TComponent>() where TComponent : IComponent
Returns
- Task
Type Parameters
TComponent
ShowAsync<TComponent>(ToastOptions?)
Shows a toast that renders TComponent with explicit options.
Task ShowAsync<TComponent>(ToastOptions? options) where TComponent : IComponent
Parameters
optionsToastOptions
Returns
- Task
Type Parameters
TComponent
ShowAsync<TComponent>(IDictionary<string, object?>?)
Shows a toast that renders TComponent with the given parameters.
Task ShowAsync<TComponent>(IDictionary<string, object?>? parameters) where TComponent : IComponent
Parameters
parametersIDictionary<string, object>
Returns
- Task
Type Parameters
TComponent
ShowAsync<TComponent>(IDictionary<string, object?>?, ToastOptions?)
Shows a toast that renders TComponent with parameters and explicit options.
Task ShowAsync<TComponent>(IDictionary<string, object?>? parameters, ToastOptions? options) where TComponent : IComponent
Parameters
parametersIDictionary<string, object>optionsToastOptions
Returns
- Task
Type Parameters
TComponent
Events
OnChangeAsync
Raised whenever the active-toasts list changes; awaited sequentially.
event Func<Task>? OnChangeAsync
Event Type
- Func<Task>