Table of Contents

Class ConfirmService

Namespace
BlazOrbit.Components
Assembly
BlazOrbit.dll

Default IConfirmService implementation auto-registered by AddBlazOrbit().

public sealed class ConfirmService : IConfirmService
Inheritance
object
ConfirmService
Implements

Constructors

ConfirmService(IModalService)

Initializes a new ConfirmService.

public ConfirmService(IModalService modal)

Parameters

modal IModalService

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

title string

Dialog title.

message string

Body message rendered below the title.

severity ConfirmSeverity

Visual tone. Danger styles the accept button as destructive.

yesLabel string

Label for the accept button.

noLabel string

Label for the cancel button.

timeout TimeSpan?

Optional auto-cancel deadline. null = no timeout.

Returns

Task<bool>