Class ConfirmService
- Namespace
- BlazOrbit.Components
- Assembly
- BlazOrbit.dll
Default IConfirmService implementation auto-registered by AddBlazOrbit().
public sealed class ConfirmService : IConfirmService
- Inheritance
-
objectConfirmService
- Implements
Constructors
ConfirmService(IModalService)
Initializes a new ConfirmService.
public ConfirmService(IModalService modal)
Parameters
modalIModalService
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.
public 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>