Interface IConfirmService
- Namespace
- BlazOrbit.Components
- Assembly
- BlazOrbit.dll
Themed replacement for the native window.confirm() prompt. Renders a
BOBConfirmDialog via IModalService
and returns whether the user accepted.
public interface IConfirmService
Remarks
Auto-registered by AddBlazOrbit(). Requires <BOBModalHost /> mounted
somewhere in the app shell — the same prerequisite as the rest of the modal stack.
Methods
AskAsync(string, string, ConfirmSeverity, string, string, TimeSpan?)
Shows a confirm dialog and resolves with true when the user accepts, false when they cancel, dismiss, or the optional timeout elapses.
Task<bool> AskAsync(string title, string message, ConfirmSeverity severity = ConfirmSeverity.Info, string yesLabel = "Yes", string noLabel = "Cancel", TimeSpan? timeout = null)
Parameters
titlestringDialog title.
messagestringBody message rendered below the title.
severityConfirmSeverityVisual tone. Danger styles the accept button as destructive.
yesLabelstringLabel for the accept button.
noLabelstringLabel for the cancel button.
timeoutTimeSpan?Optional auto-cancel deadline. null = no timeout.
Returns
- Task<bool>