Table of Contents

Class TigerTui

Namespace
ItTiger.TigerCli.Tui
Assembly
ItTiger.TigerCli.dll
Facade for TigerCli's semi-interactive prompts, message boxes, folder picker, custom dialog hosting, and activity/progress dialogs.
public static class TigerTui
Inheritance
TigerTui
Inherited Members

Remarks

Default overloads run on the standard console-backed semi-interactive shell. Shell-injected overloads take an ICliAppShell first so tests and custom hosts can provide their own terminal boundary, culture, viewport, interaction mode, timeout behavior, and cancellation policy.

Most prompt families have simple adapters (for example SelectIndexAsync or InputAsync) and rich *ResultAsync siblings. The simple adapters collapse cancel, timeout, token cancellation, and interaction-not-allowed outcomes to null or another simple return shape. The rich variants return TigerTuiResult<T> so callers can inspect the exact DialogResultKind.

Process/system cancellation (SystemCancel) is never silently collapsed by the simple adapters: they throw TigerCliSystemCancellationException. Rich result APIs surface SystemCancel as a normal result kind. Activity APIs return ActivityResult<T> instead of the prompt result shape and run headlessly in non-interactive mode because an activity is work-with-presentation, not a prompt.

Properties

DefaultShell

The default semi-interactive shell — the real console-backed ICliAppShell that the built-in TigerTui.* prompts run on. Advanced callers can use it to host their own custom controls/dialogs through the same modal loop the framework uses. ICliAppShell is the public shell contract; the concrete implementation behind this property is an internal detail.
public static ICliAppShell DefaultShell { get; }

Property Value

ICliAppShell

Methods

ConfirmAsync(ICliAppShell, string, bool?, TimeSpan?, CancellationToken)

Asks a yes-or-no question.
public static Task<bool?> ConfirmAsync(ICliAppShell shell, string title, bool? preselect = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
The shell that hosts the confirmation prompt.
title string
The question to display.
preselect bool?
true to select Yes initially, false for No, or null for the default.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.

Returns

Task<bool?>
true for Yes, false for No or dialog cancellation, or null for another unsuccessful outcome. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return null.

ConfirmAsync(string, bool?, TimeSpan?, CancellationToken)

Asks a yes-or-no question.
public static Task<bool?> ConfirmAsync(string title, bool? preselect = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

title string
The question to display.
preselect bool?
true to select Yes initially, false for No, or null for the default.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.

Returns

Task<bool?>
true for Yes, false for No or dialog cancellation, or null for another unsuccessful outcome. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return null.

ConfirmResultAsync(ICliAppShell, string, bool?, TimeSpan?, CancellationToken)

Asks a yes-or-no question and preserves the exact dialog result.
public static Task<TigerTuiResult<bool>> ConfirmResultAsync(ICliAppShell shell, string title, bool? preselect = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
The shell that hosts the confirmation prompt.
title string
The question to display.
preselect bool?
true to select Yes initially, false for No, or null for the default.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.

Returns

Task<TigerTuiResult<bool>>
A result containing the answer for Yes or No and the exact outcome. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return InteractionNotAllowed.

ConfirmResultAsync(string, bool?, TimeSpan?, CancellationToken)

Asks a yes-or-no question and preserves the exact dialog result.
public static Task<TigerTuiResult<bool>> ConfirmResultAsync(string title, bool? preselect = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

title string
The question to display.
preselect bool?
true to select Yes initially, false for No, or null for the default.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.

Returns

Task<TigerTuiResult<bool>>
A result containing the answer for Yes or No and the exact outcome. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return InteractionNotAllowed.

ErrorAsync(ICliAppShell, string, MessageBoxButtons, string?, TimeSpan?, CancellationToken)

public static Task<DialogResultKind> ErrorAsync(ICliAppShell shell, string message, MessageBoxButtons buttons = MessageBoxButtons.Ok, string? title = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
message string
buttons MessageBoxButtons
title string
timeout TimeSpan?
ct CancellationToken

Returns

Task<DialogResultKind>

ErrorAsync(string, MessageBoxButtons, string?, TimeSpan?, CancellationToken)

Convenience wrapper over MessageBoxAsync(string, MessageBoxButtons, MessageBoxKind, string?, TimeSpan?, CancellationToken) that shows the message on the error surface (Error).
public static Task<DialogResultKind> ErrorAsync(string message, MessageBoxButtons buttons = MessageBoxButtons.Ok, string? title = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

message string
buttons MessageBoxButtons
title string
timeout TimeSpan?
ct CancellationToken

Returns

Task<DialogResultKind>

InputAsync(ICliAppShell, string, string?, TimeSpan?, CancellationToken, int?, Func<string, string?>?)

Prompts for a line of visible text.
public static Task<string?> InputAsync(ICliAppShell shell, string label, string? initialValue = null, TimeSpan? timeout = null, CancellationToken ct = default, int? width = null, Func<string, string?>? validator = null)

Parameters

shell ICliAppShell
The shell that hosts the input prompt.
label string
The label displayed with the input.
initialValue string
The initial input value.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.
width int?
The optional input width in cells.
validator Func<string, string>
An optional function that returns a validation message, or null for valid input.

Returns

Task<string>
The entered text, or null when the prompt does not complete successfully. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return null.

InputAsync(string, string?, TimeSpan?, CancellationToken, int?, Func<string, string?>?)

Prompts for a line of visible text.
public static Task<string?> InputAsync(string label, string? initialValue = null, TimeSpan? timeout = null, CancellationToken ct = default, int? width = null, Func<string, string?>? validator = null)

Parameters

label string
The label displayed with the input.
initialValue string
The initial input value.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.
width int?
The optional input width in cells.
validator Func<string, string>
An optional function that returns a validation message, or null for valid input.

Returns

Task<string>
The entered text, or null when the prompt does not complete successfully. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return null.

InputResultAsync(ICliAppShell, string, string?, TimeSpan?, CancellationToken, int?, Func<string, string?>?)

Prompts for a line of visible text and preserves the exact dialog result.
public static Task<TigerTuiResult<string>> InputResultAsync(ICliAppShell shell, string label, string? initialValue = null, TimeSpan? timeout = null, CancellationToken ct = default, int? width = null, Func<string, string?>? validator = null)

Parameters

shell ICliAppShell
The shell that hosts the input prompt.
label string
The label displayed with the input.
initialValue string
The initial input value.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.
width int?
The optional input width in cells.
validator Func<string, string>
An optional function that returns a validation message, or null for valid input.

Returns

Task<TigerTuiResult<string>>
A result containing the entered text and exact outcome. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return InteractionNotAllowed.

InputResultAsync(string, string?, TimeSpan?, CancellationToken, int?, Func<string, string?>?)

Prompts for a line of visible text and preserves the exact dialog result.
public static Task<TigerTuiResult<string>> InputResultAsync(string label, string? initialValue = null, TimeSpan? timeout = null, CancellationToken ct = default, int? width = null, Func<string, string?>? validator = null)

Parameters

label string
The label displayed with the input.
initialValue string
The initial input value.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.
width int?
The optional input width in cells.
validator Func<string, string>
An optional function that returns a validation message, or null for valid input.

Returns

Task<TigerTuiResult<string>>
A result containing the entered text and exact outcome. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return InteractionNotAllowed.

MessageBoxAsync(ICliAppShell, string, MessageBoxButtons, MessageBoxKind, string?, TimeSpan?, CancellationToken)

Displays a message box and returns the action used to close it.
public static Task<DialogResultKind> MessageBoxAsync(ICliAppShell shell, string message, MessageBoxButtons buttons = MessageBoxButtons.Ok, MessageBoxKind kind = MessageBoxKind.Normal, string? title = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
The shell that hosts the message box.
message string
The message to display.
buttons MessageBoxButtons
The buttons to display.
kind MessageBoxKind
The semantic kind that selects the message-box surface.
title string
The optional dialog title.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the message box.

Returns

Task<DialogResultKind>
The dialog result. Interactive and semi-interactive shells render the message box; non-interactive shells do not read input and return InteractionNotAllowed.

MessageBoxAsync(string, MessageBoxButtons, MessageBoxKind, string?, TimeSpan?, CancellationToken)

Displays a message box and returns the action used to close it.
public static Task<DialogResultKind> MessageBoxAsync(string message, MessageBoxButtons buttons = MessageBoxButtons.Ok, MessageBoxKind kind = MessageBoxKind.Normal, string? title = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

message string
The message to display.
buttons MessageBoxButtons
The buttons to display.
kind MessageBoxKind
The semantic kind that selects the message-box surface.
title string
The optional dialog title.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the message box.

Returns

Task<DialogResultKind>
The dialog result. Interactive and semi-interactive shells render the message box; non-interactive shells do not read input and return InteractionNotAllowed.

MultiColumnSelectIndexAsync(ICliAppShell, string, IReadOnlyList<SelectColumn>, IReadOnlyList<SelectRow>, int?, TimeSpan?, CancellationToken)

public static Task<int?> MultiColumnSelectIndexAsync(ICliAppShell shell, string title, IReadOnlyList<SelectColumn> columns, IReadOnlyList<SelectRow> rows, int? preselectIndex = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
title string
columns IReadOnlyList<SelectColumn>
rows IReadOnlyList<SelectRow>
preselectIndex int?
timeout TimeSpan?
ct CancellationToken

Returns

Task<int?>

MultiColumnSelectIndexAsync(string, IReadOnlyList<SelectColumn>, IReadOnlyList<SelectRow>, int?, TimeSpan?, CancellationToken)

Presents a single-selection picker whose rows are structured, aligned multi-column data (see SelectColumn/SelectRow/SelectCell) and returns the chosen row index, or null on cancel/timeout. Runs on the default semi-interactive shell.
public static Task<int?> MultiColumnSelectIndexAsync(string title, IReadOnlyList<SelectColumn> columns, IReadOnlyList<SelectRow> rows, int? preselectIndex = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

title string
columns IReadOnlyList<SelectColumn>
rows IReadOnlyList<SelectRow>
preselectIndex int?
timeout TimeSpan?
ct CancellationToken

Returns

Task<int?>

MultiColumnSelectIndexResultAsync(ICliAppShell, string, IReadOnlyList<SelectColumn>, IReadOnlyList<SelectRow>, int?, TimeSpan?, CancellationToken)

public static Task<TigerTuiResult<int>> MultiColumnSelectIndexResultAsync(ICliAppShell shell, string title, IReadOnlyList<SelectColumn> columns, IReadOnlyList<SelectRow> rows, int? preselectIndex = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
title string
columns IReadOnlyList<SelectColumn>
rows IReadOnlyList<SelectRow>
preselectIndex int?
timeout TimeSpan?
ct CancellationToken

Returns

Task<TigerTuiResult<int>>

MultiColumnSelectIndexResultAsync(string, IReadOnlyList<SelectColumn>, IReadOnlyList<SelectRow>, int?, TimeSpan?, CancellationToken)

Rich variant of MultiColumnSelectIndexAsync(string, IReadOnlyList<SelectColumn>, IReadOnlyList<SelectRow>, int?, TimeSpan?, CancellationToken) that preserves the exact DialogResultKind instead of collapsing cancel/timeout to null. Framework internals use this so they can branch on the kind (e.g. Escape vs. timeout).
public static Task<TigerTuiResult<int>> MultiColumnSelectIndexResultAsync(string title, IReadOnlyList<SelectColumn> columns, IReadOnlyList<SelectRow> rows, int? preselectIndex = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

title string
columns IReadOnlyList<SelectColumn>
rows IReadOnlyList<SelectRow>
preselectIndex int?
timeout TimeSpan?
ct CancellationToken

Returns

Task<TigerTuiResult<int>>

MultiSelectAsync<T>(ICliAppShell, string, IReadOnlyList<T>, Func<T, string>, IReadOnlyCollection<T>?, IEqualityComparer<T>?, CliFormattingMode, TimeSpan?, CancellationToken)

Selects zero or more items using caller-provided labels.
public static Task<IReadOnlyList<T>?> MultiSelectAsync<T>(ICliAppShell shell, string title, IReadOnlyList<T> items, Func<T, string> labelSelector, IReadOnlyCollection<T>? preselected = null, IEqualityComparer<T>? comparer = null, CliFormattingMode itemsFormattingMode = CliFormattingMode.Raw, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
The shell that hosts the prompt.
title string
The prompt title.
items IReadOnlyList<T>
The items available for selection.
labelSelector Func<T, string>
A function that produces the displayed label for each item.
preselected IReadOnlyCollection<T>
The items selected initially.
comparer IEqualityComparer<T>
The comparer used to match preselected items.
itemsFormattingMode CliFormattingMode
How item labels are formatted.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.

Returns

Task<IReadOnlyList<T>>
The selected items, or null when the prompt does not complete successfully. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return null.

Type Parameters

T
The item type.

MultiSelectAsync<T>(string, IReadOnlyList<T>, Func<T, string>, IReadOnlyCollection<T>?, IEqualityComparer<T>?, CliFormattingMode, TimeSpan?, CancellationToken)

Selects zero or more items using caller-provided labels.
public static Task<IReadOnlyList<T>?> MultiSelectAsync<T>(string title, IReadOnlyList<T> items, Func<T, string> labelSelector, IReadOnlyCollection<T>? preselected = null, IEqualityComparer<T>? comparer = null, CliFormattingMode itemsFormattingMode = CliFormattingMode.Raw, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

title string
The prompt title.
items IReadOnlyList<T>
The items available for selection.
labelSelector Func<T, string>
A function that produces the displayed label for each item.
preselected IReadOnlyCollection<T>
The items selected initially.
comparer IEqualityComparer<T>
The comparer used to match preselected items.
itemsFormattingMode CliFormattingMode
How item labels are formatted.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.

Returns

Task<IReadOnlyList<T>>
The selected items, or null when the prompt does not complete successfully. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return null.

Type Parameters

T
The item type.

MultiSelectFlagsAsync<TEnum>(ICliAppShell, string, TEnum, Func<TEnum, string>?, TimeSpan?, CancellationToken)

Selects zero or more single-bit members of a flags enum.
public static Task<TEnum?> MultiSelectFlagsAsync<TEnum>(ICliAppShell shell, string title, TEnum selected = default, Func<TEnum, string>? labelSelector = null, TimeSpan? timeout = null, CancellationToken ct = default) where TEnum : struct, Enum

Parameters

shell ICliAppShell
The shell that hosts the prompt.
title string
The prompt title.
selected TEnum
The flags selected initially.
labelSelector Func<TEnum, string>
An optional function that produces each flag label.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.

Returns

Task<TEnum?>
The selected flags, or null when the prompt does not complete successfully. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return null.

Type Parameters

TEnum
The flags enum type.

MultiSelectFlagsAsync<TEnum>(string, TEnum, Func<TEnum, string>?, TimeSpan?, CancellationToken)

Selects zero or more single-bit members of a flags enum.
public static Task<TEnum?> MultiSelectFlagsAsync<TEnum>(string title, TEnum selected = default, Func<TEnum, string>? labelSelector = null, TimeSpan? timeout = null, CancellationToken ct = default) where TEnum : struct, Enum

Parameters

title string
The prompt title.
selected TEnum
The flags selected initially.
labelSelector Func<TEnum, string>
An optional function that produces each flag label.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.

Returns

Task<TEnum?>
The selected flags, or null when the prompt does not complete successfully. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return null.

Type Parameters

TEnum
The flags enum type.

MultiSelectFlagsResultAsync<TEnum>(ICliAppShell, string, TEnum, Func<TEnum, string>?, TimeSpan?, CancellationToken)

Selects flags and preserves the exact dialog result.
public static Task<TigerTuiResult<TEnum>> MultiSelectFlagsResultAsync<TEnum>(ICliAppShell shell, string title, TEnum selected = default, Func<TEnum, string>? labelSelector = null, TimeSpan? timeout = null, CancellationToken ct = default) where TEnum : struct, Enum

Parameters

shell ICliAppShell
The shell that hosts the prompt.
title string
The prompt title.
selected TEnum
The flags selected initially.
labelSelector Func<TEnum, string>
An optional function that produces each flag label.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.

Returns

Task<TigerTuiResult<TEnum>>
A result containing the selected flags and exact outcome. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return InteractionNotAllowed.

Type Parameters

TEnum
The flags enum type.

MultiSelectFlagsResultAsync<TEnum>(string, TEnum, Func<TEnum, string>?, TimeSpan?, CancellationToken)

Selects flags and preserves the exact dialog result.
public static Task<TigerTuiResult<TEnum>> MultiSelectFlagsResultAsync<TEnum>(string title, TEnum selected = default, Func<TEnum, string>? labelSelector = null, TimeSpan? timeout = null, CancellationToken ct = default) where TEnum : struct, Enum

Parameters

title string
The prompt title.
selected TEnum
The flags selected initially.
labelSelector Func<TEnum, string>
An optional function that produces each flag label.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.

Returns

Task<TigerTuiResult<TEnum>>
A result containing the selected flags and exact outcome. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return InteractionNotAllowed.

Type Parameters

TEnum
The flags enum type.

MultiSelectIndexesAsync(ICliAppShell, string, IReadOnlyList<string>, IReadOnlyCollection<int>?, CliFormattingMode, TimeSpan?, CancellationToken)

Selects zero or more label indexes.
public static Task<int[]?> MultiSelectIndexesAsync(ICliAppShell shell, string title, IReadOnlyList<string> labels, IReadOnlyCollection<int>? preselectedIndexes = null, CliFormattingMode itemsFormattingMode = CliFormattingMode.Raw, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
The shell that hosts the prompt.
title string
The prompt title.
labels IReadOnlyList<string>
The labels available for selection.
preselectedIndexes IReadOnlyCollection<int>
The indexes selected initially.
itemsFormattingMode CliFormattingMode
How labels are formatted.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.

Returns

Task<int[]>
The selected indexes, or null when the prompt does not complete successfully. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return null.

MultiSelectIndexesAsync(string, IReadOnlyList<string>, IReadOnlyCollection<int>?, CliFormattingMode, TimeSpan?, CancellationToken)

Selects zero or more label indexes.
public static Task<int[]?> MultiSelectIndexesAsync(string title, IReadOnlyList<string> labels, IReadOnlyCollection<int>? preselectedIndexes = null, CliFormattingMode itemsFormattingMode = CliFormattingMode.Raw, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

title string
The prompt title.
labels IReadOnlyList<string>
The labels available for selection.
preselectedIndexes IReadOnlyCollection<int>
The indexes selected initially.
itemsFormattingMode CliFormattingMode
How labels are formatted.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.

Returns

Task<int[]>
The selected indexes, or null when the prompt does not complete successfully. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return null.

MultiSelectIndexesResultAsync(ICliAppShell, string, IReadOnlyList<string>, IReadOnlyCollection<int>?, CliFormattingMode, TimeSpan?, CancellationToken)

Selects zero or more label indexes and preserves the exact dialog result.
public static Task<TigerTuiResult<int[]>> MultiSelectIndexesResultAsync(ICliAppShell shell, string title, IReadOnlyList<string> labels, IReadOnlyCollection<int>? preselectedIndexes = null, CliFormattingMode itemsFormattingMode = CliFormattingMode.Raw, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
The shell that hosts the prompt.
title string
The prompt title.
labels IReadOnlyList<string>
The labels available for selection.
preselectedIndexes IReadOnlyCollection<int>
The indexes selected initially.
itemsFormattingMode CliFormattingMode
How labels are formatted.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.

Returns

Task<TigerTuiResult<int[]>>
A result containing the selected indexes and exact outcome. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return InteractionNotAllowed.

MultiSelectIndexesResultAsync(string, IReadOnlyList<string>, IReadOnlyCollection<int>?, CliFormattingMode, TimeSpan?, CancellationToken)

Selects zero or more label indexes and preserves the exact dialog result.
public static Task<TigerTuiResult<int[]>> MultiSelectIndexesResultAsync(string title, IReadOnlyList<string> labels, IReadOnlyCollection<int>? preselectedIndexes = null, CliFormattingMode itemsFormattingMode = CliFormattingMode.Raw, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

title string
The prompt title.
labels IReadOnlyList<string>
The labels available for selection.
preselectedIndexes IReadOnlyCollection<int>
The indexes selected initially.
itemsFormattingMode CliFormattingMode
How labels are formatted.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.

Returns

Task<TigerTuiResult<int[]>>
A result containing the selected indexes and exact outcome. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return InteractionNotAllowed.

RunActivityAsync(ICliAppShell, ActivityDialogSpec, Func<ActivityContext, CancellationToken, Task>, ActivityStopMode, ActivitySpinnerSpec?, TimeSpan?, CancellationToken)

Runs a value-less rich activity dialog (no title) against an explicit shell.
public static Task<ActivityResult<bool>> RunActivityAsync(ICliAppShell shell, ActivityDialogSpec spec, Func<ActivityContext, CancellationToken, Task> operation, ActivityStopMode stopMode = ActivityStopMode.Cancel, ActivitySpinnerSpec? spinner = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
spec ActivityDialogSpec
operation Func<ActivityContext, CancellationToken, Task>
stopMode ActivityStopMode
spinner ActivitySpinnerSpec
timeout TimeSpan?
ct CancellationToken

Returns

Task<ActivityResult<bool>>

RunActivityAsync(ICliAppShell, string?, ActivityDialogSpec, Func<ActivityContext, CancellationToken, Task>, ActivityStopMode, ActivitySpinnerSpec?, TimeSpan?, CancellationToken)

Runs a value-less rich activity dialog against an explicit shell.
public static Task<ActivityResult<bool>> RunActivityAsync(ICliAppShell shell, string? title, ActivityDialogSpec spec, Func<ActivityContext, CancellationToken, Task> operation, ActivityStopMode stopMode = ActivityStopMode.Cancel, ActivitySpinnerSpec? spinner = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
title string
spec ActivityDialogSpec
operation Func<ActivityContext, CancellationToken, Task>
stopMode ActivityStopMode
spinner ActivitySpinnerSpec
timeout TimeSpan?
ct CancellationToken

Returns

Task<ActivityResult<bool>>

RunActivityAsync(ICliAppShell, string, Func<ActivityContext, CancellationToken, Task>, ActivityStopMode, ActivitySpinnerSpec?, TimeSpan?, CancellationToken)

Runs a value-less static-message activity dialog (no title) against an explicit shell. In non-interactive mode the same message is printed once as the default non-interactive status line.
public static Task<ActivityResult<bool>> RunActivityAsync(ICliAppShell shell, string message, Func<ActivityContext, CancellationToken, Task> operation, ActivityStopMode stopMode = ActivityStopMode.Cancel, ActivitySpinnerSpec? spinner = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
message string
operation Func<ActivityContext, CancellationToken, Task>
stopMode ActivityStopMode
spinner ActivitySpinnerSpec
timeout TimeSpan?
ct CancellationToken

Returns

Task<ActivityResult<bool>>

RunActivityAsync(ICliAppShell, string?, string, Func<ActivityContext, CancellationToken, Task>, ActivityStopMode, ActivitySpinnerSpec?, TimeSpan?, CancellationToken)

Runs a value-less static-message activity dialog against an explicit shell. In non-interactive mode the same message is printed once as the default non-interactive status line.
public static Task<ActivityResult<bool>> RunActivityAsync(ICliAppShell shell, string? title, string message, Func<ActivityContext, CancellationToken, Task> operation, ActivityStopMode stopMode = ActivityStopMode.Cancel, ActivitySpinnerSpec? spinner = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
title string
message string
operation Func<ActivityContext, CancellationToken, Task>
stopMode ActivityStopMode
spinner ActivitySpinnerSpec
timeout TimeSpan?
ct CancellationToken

Returns

Task<ActivityResult<bool>>

RunActivityAsync(ActivityDialogSpec, Func<ActivityContext, CancellationToken, Task>, ActivityStopMode, ActivitySpinnerSpec?, TimeSpan?, CancellationToken)

Runs a rich activity dialog (no title) for a value-less operation.
public static Task<ActivityResult<bool>> RunActivityAsync(ActivityDialogSpec spec, Func<ActivityContext, CancellationToken, Task> operation, ActivityStopMode stopMode = ActivityStopMode.Cancel, ActivitySpinnerSpec? spinner = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

spec ActivityDialogSpec
operation Func<ActivityContext, CancellationToken, Task>
stopMode ActivityStopMode
spinner ActivitySpinnerSpec
timeout TimeSpan?
ct CancellationToken

Returns

Task<ActivityResult<bool>>

RunActivityAsync(string?, ActivityDialogSpec, Func<ActivityContext, CancellationToken, Task>, ActivityStopMode, ActivitySpinnerSpec?, TimeSpan?, CancellationToken)

Runs a rich activity dialog for a value-less operation against the default shell. The result's Value is true on completion.
public static Task<ActivityResult<bool>> RunActivityAsync(string? title, ActivityDialogSpec spec, Func<ActivityContext, CancellationToken, Task> operation, ActivityStopMode stopMode = ActivityStopMode.Cancel, ActivitySpinnerSpec? spinner = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

title string
spec ActivityDialogSpec
operation Func<ActivityContext, CancellationToken, Task>
stopMode ActivityStopMode
spinner ActivitySpinnerSpec
timeout TimeSpan?
ct CancellationToken

Returns

Task<ActivityResult<bool>>

RunActivityAsync(string, Func<ActivityContext, CancellationToken, Task>, ActivityStopMode, ActivitySpinnerSpec?, TimeSpan?, CancellationToken)

Runs a static-message activity dialog (no title) for a value-less operation. In non-interactive mode the same message is printed once as the default non-interactive status line.
public static Task<ActivityResult<bool>> RunActivityAsync(string message, Func<ActivityContext, CancellationToken, Task> operation, ActivityStopMode stopMode = ActivityStopMode.Cancel, ActivitySpinnerSpec? spinner = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

message string
operation Func<ActivityContext, CancellationToken, Task>
stopMode ActivityStopMode
spinner ActivitySpinnerSpec
timeout TimeSpan?
ct CancellationToken

Returns

Task<ActivityResult<bool>>

RunActivityAsync(string?, string, Func<ActivityContext, CancellationToken, Task>, ActivityStopMode, ActivitySpinnerSpec?, TimeSpan?, CancellationToken)

Runs a static-message activity dialog for a value-less operation. In non-interactive mode the same message is printed once as the default non-interactive status line.
public static Task<ActivityResult<bool>> RunActivityAsync(string? title, string message, Func<ActivityContext, CancellationToken, Task> operation, ActivityStopMode stopMode = ActivityStopMode.Cancel, ActivitySpinnerSpec? spinner = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

title string
message string
operation Func<ActivityContext, CancellationToken, Task>
stopMode ActivityStopMode
spinner ActivitySpinnerSpec
timeout TimeSpan?
ct CancellationToken

Returns

Task<ActivityResult<bool>>

RunActivityAsync<T>(ICliAppShell, ActivityDialogSpec, Func<ActivityContext, CancellationToken, Task<T>>, ActivityStopMode, ActivitySpinnerSpec?, TimeSpan?, CancellationToken)

Runs a rich activity dialog (no title) against an explicit shell.
public static Task<ActivityResult<T>> RunActivityAsync<T>(ICliAppShell shell, ActivityDialogSpec spec, Func<ActivityContext, CancellationToken, Task<T>> operation, ActivityStopMode stopMode = ActivityStopMode.Cancel, ActivitySpinnerSpec? spinner = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
spec ActivityDialogSpec
operation Func<ActivityContext, CancellationToken, Task<T>>
stopMode ActivityStopMode
spinner ActivitySpinnerSpec
timeout TimeSpan?
ct CancellationToken

Returns

Task<ActivityResult<T>>

Type Parameters

T

RunActivityAsync<T>(ICliAppShell, string?, ActivityDialogSpec, Func<ActivityContext, CancellationToken, Task<T>>, ActivityStopMode, ActivitySpinnerSpec?, TimeSpan?, CancellationToken)

Runs a rich activity dialog against an explicit shell.
public static Task<ActivityResult<T>> RunActivityAsync<T>(ICliAppShell shell, string? title, ActivityDialogSpec spec, Func<ActivityContext, CancellationToken, Task<T>> operation, ActivityStopMode stopMode = ActivityStopMode.Cancel, ActivitySpinnerSpec? spinner = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
title string
spec ActivityDialogSpec
operation Func<ActivityContext, CancellationToken, Task<T>>
stopMode ActivityStopMode
spinner ActivitySpinnerSpec
timeout TimeSpan?
ct CancellationToken

Returns

Task<ActivityResult<T>>

Type Parameters

T

RunActivityAsync<T>(ICliAppShell, string, Func<ActivityContext, CancellationToken, Task<T>>, ActivityStopMode, ActivitySpinnerSpec?, TimeSpan?, CancellationToken)

Runs a static-message activity dialog (no title) against an explicit shell. In non-interactive mode the same message is printed once as the default non-interactive status line.
public static Task<ActivityResult<T>> RunActivityAsync<T>(ICliAppShell shell, string message, Func<ActivityContext, CancellationToken, Task<T>> operation, ActivityStopMode stopMode = ActivityStopMode.Cancel, ActivitySpinnerSpec? spinner = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
message string
operation Func<ActivityContext, CancellationToken, Task<T>>
stopMode ActivityStopMode
spinner ActivitySpinnerSpec
timeout TimeSpan?
ct CancellationToken

Returns

Task<ActivityResult<T>>

Type Parameters

T

RunActivityAsync<T>(ICliAppShell, string?, string, Func<ActivityContext, CancellationToken, Task<T>>, ActivityStopMode, ActivitySpinnerSpec?, TimeSpan?, CancellationToken)

Runs a static-message activity dialog against an explicit shell. In non-interactive mode the same message is printed once as the default non-interactive status line.
public static Task<ActivityResult<T>> RunActivityAsync<T>(ICliAppShell shell, string? title, string message, Func<ActivityContext, CancellationToken, Task<T>> operation, ActivityStopMode stopMode = ActivityStopMode.Cancel, ActivitySpinnerSpec? spinner = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
title string
message string
operation Func<ActivityContext, CancellationToken, Task<T>>
stopMode ActivityStopMode
spinner ActivitySpinnerSpec
timeout TimeSpan?
ct CancellationToken

Returns

Task<ActivityResult<T>>

Type Parameters

T

RunActivityAsync<T>(ActivityDialogSpec, Func<ActivityContext, CancellationToken, Task<T>>, ActivityStopMode, ActivitySpinnerSpec?, TimeSpan?, CancellationToken)

Runs a rich activity dialog (no title) for a background operation.
public static Task<ActivityResult<T>> RunActivityAsync<T>(ActivityDialogSpec spec, Func<ActivityContext, CancellationToken, Task<T>> operation, ActivityStopMode stopMode = ActivityStopMode.Cancel, ActivitySpinnerSpec? spinner = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

spec ActivityDialogSpec
operation Func<ActivityContext, CancellationToken, Task<T>>
stopMode ActivityStopMode
spinner ActivitySpinnerSpec
timeout TimeSpan?
ct CancellationToken

Returns

Task<ActivityResult<T>>

Type Parameters

T

RunActivityAsync<T>(string?, ActivityDialogSpec, Func<ActivityContext, CancellationToken, Task<T>>, ActivityStopMode, ActivitySpinnerSpec?, TimeSpan?, CancellationToken)

Runs a rich activity dialog for a background operation against the default shell, returning the rich ActivityResult<T> (never collapsed). The operation reports progress through the supplied ActivityContext. The dialog exposes a single stop action selected by stopMode (Cancel or Abort, never both); a confirmed stop switches the dialog to a "Cancelling…"/"Aborting…" view (with no action button) and waits for the operation to observe cancellation.
public static Task<ActivityResult<T>> RunActivityAsync<T>(string? title, ActivityDialogSpec spec, Func<ActivityContext, CancellationToken, Task<T>> operation, ActivityStopMode stopMode = ActivityStopMode.Cancel, ActivitySpinnerSpec? spinner = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

title string
spec ActivityDialogSpec
operation Func<ActivityContext, CancellationToken, Task<T>>
stopMode ActivityStopMode
spinner ActivitySpinnerSpec
timeout TimeSpan?
ct CancellationToken

Returns

Task<ActivityResult<T>>

Type Parameters

T

RunActivityAsync<T>(string, Func<ActivityContext, CancellationToken, Task<T>>, ActivityStopMode, ActivitySpinnerSpec?, TimeSpan?, CancellationToken)

Runs a static-message activity dialog (no title) for a background operation. In non-interactive mode the same message is printed once as the default non-interactive status line.
public static Task<ActivityResult<T>> RunActivityAsync<T>(string message, Func<ActivityContext, CancellationToken, Task<T>> operation, ActivityStopMode stopMode = ActivityStopMode.Cancel, ActivitySpinnerSpec? spinner = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

message string
operation Func<ActivityContext, CancellationToken, Task<T>>
stopMode ActivityStopMode
spinner ActivitySpinnerSpec
timeout TimeSpan?
ct CancellationToken

Returns

Task<ActivityResult<T>>

Type Parameters

T

RunActivityAsync<T>(string?, string, Func<ActivityContext, CancellationToken, Task<T>>, ActivityStopMode, ActivitySpinnerSpec?, TimeSpan?, CancellationToken)

Runs a rich activity dialog that shows a single static message line (one left-aligned text cell) while operation runs. The message is a trusted activity text template — it may contain TigerCli markup; write literal braces as {{/}}. In non-interactive mode the same message is printed once as the default non-interactive status line. Use an explicit ActivityDialogSpec with SetNonInteractiveMessage(string?) when the non-interactive message should differ from the visible activity message.
public static Task<ActivityResult<T>> RunActivityAsync<T>(string? title, string message, Func<ActivityContext, CancellationToken, Task<T>> operation, ActivityStopMode stopMode = ActivityStopMode.Cancel, ActivitySpinnerSpec? spinner = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

title string
message string
operation Func<ActivityContext, CancellationToken, Task<T>>
stopMode ActivityStopMode
spinner ActivitySpinnerSpec
timeout TimeSpan?
ct CancellationToken

Returns

Task<ActivityResult<T>>

Type Parameters

T

RunControlAsync(ICliAppShell, InlineControlBase, string?, InlineDialogConfirmationPolicy?, TimeSpan?, CancellationToken)

Hosts and runs a custom control against an explicit shell.
public static Task<DialogResult> RunControlAsync(ICliAppShell shell, InlineControlBase control, string? title = null, InlineDialogConfirmationPolicy? confirmation = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
control InlineControlBase
title string
confirmation InlineDialogConfirmationPolicy
timeout TimeSpan?
ct CancellationToken

Returns

Task<DialogResult>

RunControlAsync(InlineControlBase, string?, InlineDialogConfirmationPolicy?, TimeSpan?, CancellationToken)

Hosts a custom InlineControlBase in an InlineDialog and runs it on the DefaultShell, returning its DialogResult (the control's Payload is carried on Payload). This is the public path for running a custom control without touching internal shell types; the built-in prompts are themselves thin adapters over the same composition.
public static Task<DialogResult> RunControlAsync(InlineControlBase control, string? title = null, InlineDialogConfirmationPolicy? confirmation = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

control InlineControlBase
title string
confirmation InlineDialogConfirmationPolicy
timeout TimeSpan?
ct CancellationToken

Returns

Task<DialogResult>

RunDialogAsync(ICliAppShell, ICliDialog, TimeSpan?, CancellationToken)

Runs a fully-constructed dialog against an explicit shell.
public static Task<DialogResult> RunDialogAsync(ICliAppShell shell, ICliDialog dialog, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
dialog ICliDialog
timeout TimeSpan?
ct CancellationToken

Returns

Task<DialogResult>

RunDialogAsync(ICliDialog, TimeSpan?, CancellationToken)

Runs a fully-constructed dialog on the DefaultShell and returns its DialogResult. Use this to run a custom ICliDialog (e.g. an InlineDialog) without depending on internal shell types. Timeout and cancellation behave exactly as for the built-in prompts.
public static Task<DialogResult> RunDialogAsync(ICliDialog dialog, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

dialog ICliDialog
timeout TimeSpan?
ct CancellationToken

Returns

Task<DialogResult>

SecretInputAsync(ICliAppShell, string, string?, TimeSpan?, CancellationToken, int?, Func<string, string?>?)

Prompts for a line of masked text.
public static Task<string?> SecretInputAsync(ICliAppShell shell, string label, string? initialValue = null, TimeSpan? timeout = null, CancellationToken ct = default, int? width = null, Func<string, string?>? validator = null)

Parameters

shell ICliAppShell
The shell that hosts the input prompt.
label string
The label displayed with the input.
initialValue string
The initial input value.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.
width int?
The optional input width in cells.
validator Func<string, string>
An optional function that returns a validation message, or null for valid input.

Returns

Task<string>
The entered text, or null when the prompt does not complete successfully. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return null.

SecretInputAsync(string, string?, TimeSpan?, CancellationToken, int?, Func<string, string?>?)

Prompts for a line of masked text.
public static Task<string?> SecretInputAsync(string label, string? initialValue = null, TimeSpan? timeout = null, CancellationToken ct = default, int? width = null, Func<string, string?>? validator = null)

Parameters

label string
The label displayed with the input.
initialValue string
The initial input value.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.
width int?
The optional input width in cells.
validator Func<string, string>
An optional function that returns a validation message, or null for valid input.

Returns

Task<string>
The entered text, or null when the prompt does not complete successfully. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return null.

SecretInputResultAsync(ICliAppShell, string, string?, TimeSpan?, CancellationToken, int?, Func<string, string?>?)

Prompts for a line of masked text and preserves the exact dialog result.
public static Task<TigerTuiResult<string>> SecretInputResultAsync(ICliAppShell shell, string label, string? initialValue = null, TimeSpan? timeout = null, CancellationToken ct = default, int? width = null, Func<string, string?>? validator = null)

Parameters

shell ICliAppShell
The shell that hosts the input prompt.
label string
The label displayed with the input.
initialValue string
The initial input value.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.
width int?
The optional input width in cells.
validator Func<string, string>
An optional function that returns a validation message, or null for valid input.

Returns

Task<TigerTuiResult<string>>
A result containing the entered text and exact outcome. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return InteractionNotAllowed.

SecretInputResultAsync(string, string?, TimeSpan?, CancellationToken, int?, Func<string, string?>?)

Prompts for a line of masked text and preserves the exact dialog result.
public static Task<TigerTuiResult<string>> SecretInputResultAsync(string label, string? initialValue = null, TimeSpan? timeout = null, CancellationToken ct = default, int? width = null, Func<string, string?>? validator = null)

Parameters

label string
The label displayed with the input.
initialValue string
The initial input value.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.
width int?
The optional input width in cells.
validator Func<string, string>
An optional function that returns a validation message, or null for valid input.

Returns

Task<TigerTuiResult<string>>
A result containing the entered text and exact outcome. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return InteractionNotAllowed.

SelectAsync(ICliAppShell, string, IReadOnlyList<string>, string?, SelectOrder, IComparer<string>?, CliFormattingMode, TimeSpan?, CancellationToken)

Selects one string from a list.
public static Task<string?> SelectAsync(ICliAppShell shell, string title, IReadOnlyList<string> items, string? preselect = null, SelectOrder order = SelectOrder.Insertion, IComparer<string>? customOrder = null, CliFormattingMode itemsFormattingMode = CliFormattingMode.Raw, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
The shell that hosts the prompt.
title string
The prompt title.
items IReadOnlyList<string>
The values available for selection.
preselect string
The value selected initially, or null to select the first value.
order SelectOrder
The order in which to display the values.
customOrder IComparer<string>
The comparer used when order is Custom.
itemsFormattingMode CliFormattingMode
How item labels are formatted.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.

Returns

Task<string>
The selected value, or null when no value is selected. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return null.

SelectAsync(string, IReadOnlyList<string>, string?, SelectOrder, IComparer<string>?, CliFormattingMode, TimeSpan?, CancellationToken)

Selects one string from a list.
public static Task<string?> SelectAsync(string title, IReadOnlyList<string> items, string? preselect = null, SelectOrder order = SelectOrder.Insertion, IComparer<string>? customOrder = null, CliFormattingMode itemsFormattingMode = CliFormattingMode.Raw, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

title string
The prompt title.
items IReadOnlyList<string>
The values available for selection.
preselect string
The value selected initially, or null to select the first value.
order SelectOrder
The order in which to display the values.
customOrder IComparer<string>
The comparer used when order is Custom.
itemsFormattingMode CliFormattingMode
How item labels are formatted.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.

Returns

Task<string>
The selected value, or null when no value is selected. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return null.

SelectAsync<TKey>(ICliAppShell, string, IReadOnlyList<OptionItem<TKey>>, int?, SelectOrder, IComparer<OptionItem<TKey>>?, IEqualityComparer<TKey>?, TimeSpan?, CancellationToken)

Selects the key of one option from a list.
public static Task<TKey?> SelectAsync<TKey>(ICliAppShell shell, string title, IReadOnlyList<OptionItem<TKey>> items, int? preselectIndex = null, SelectOrder order = SelectOrder.Insertion, IComparer<OptionItem<TKey>>? customOrder = null, IEqualityComparer<TKey>? keyComparer = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
The shell that hosts the prompt.
title string
The prompt title.
items IReadOnlyList<OptionItem<TKey>>
The keyed options available for selection.
preselectIndex int?
The initially selected option index, or null for the first option.
order SelectOrder
The order in which to display the options.
customOrder IComparer<OptionItem<TKey>>
The comparer used when order is Custom.
keyComparer IEqualityComparer<TKey>
The comparer used for option keys.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.

Returns

Task<TKey>
The selected key, or the default value when no option is selected. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input.

Type Parameters

TKey
The option key type.

SelectAsync<T>(ICliAppShell, string, T?, TimeSpan?, CancellationToken)

Selects one value from the members of an enum.
public static Task<T?> SelectAsync<T>(ICliAppShell shell, string title, T? preselect = null, TimeSpan? timeout = null, CancellationToken ct = default) where T : struct, Enum

Parameters

shell ICliAppShell
The shell that hosts the prompt.
title string
The prompt title.
preselect T?
The value selected initially, or null to select the first value.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.

Returns

Task<T?>
The selected enum value, or null when no value is selected. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return null.

Type Parameters

T
The enum type to select from.

SelectAsync<TKey>(string, IReadOnlyList<OptionItem<TKey>>, int?, SelectOrder, IComparer<OptionItem<TKey>>?, IEqualityComparer<TKey>?, TimeSpan?, CancellationToken)

Selects the key of one option from a list.
public static Task<TKey?> SelectAsync<TKey>(string title, IReadOnlyList<OptionItem<TKey>> items, int? preselectIndex = null, SelectOrder order = SelectOrder.Insertion, IComparer<OptionItem<TKey>>? customOrder = null, IEqualityComparer<TKey>? keyComparer = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

title string
The prompt title.
items IReadOnlyList<OptionItem<TKey>>
The keyed options available for selection.
preselectIndex int?
The initially selected option index, or null for the first option.
order SelectOrder
The order in which to display the options.
customOrder IComparer<OptionItem<TKey>>
The comparer used when order is Custom.
keyComparer IEqualityComparer<TKey>
The comparer used for option keys.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.

Returns

Task<TKey>
The selected key, or the default value when no option is selected. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input.

Type Parameters

TKey
The option key type.

SelectAsync<T>(string, T?, TimeSpan?, CancellationToken)

Selects one value from the members of an enum.
public static Task<T?> SelectAsync<T>(string title, T? preselect = null, TimeSpan? timeout = null, CancellationToken ct = default) where T : struct, Enum

Parameters

title string
The prompt title.
preselect T?
The value selected initially, or null to select the first value.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.

Returns

Task<T?>
The selected enum value, or null when no value is selected. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return null.

Type Parameters

T
The enum type to select from.

SelectFolderAsync(ICliAppShell, string, string?, IFolderBrowser?, TimeSpan?, CancellationToken)

Selects a folder path.
public static Task<string?> SelectFolderAsync(ICliAppShell shell, string title, string? initialPath = null, IFolderBrowser? browser = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
The shell that hosts the folder picker.
title string
The picker title.
initialPath string
The path shown initially, or null to use the browser root.
browser IFolderBrowser
The folder navigation provider, or null to use the local filesystem.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the picker.

Returns

Task<string>
The selected folder path, or null when no folder is selected. Interactive and semi-interactive shells render the picker; non-interactive shells do not read input and return null.

SelectFolderAsync(string, string?, IFolderBrowser, TimeSpan?, CancellationToken)

Runs the folder picker on the default semi-interactive shell against a caller-supplied browser. Lets a consumer drive the default shell with a custom (e.g. in-memory) navigation policy instead of the real filesystem.
public static Task<string?> SelectFolderAsync(string title, string? initialPath, IFolderBrowser browser, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

title string
initialPath string
browser IFolderBrowser
timeout TimeSpan?
ct CancellationToken

Returns

Task<string>

SelectFolderAsync(string, string?, TimeSpan?, CancellationToken)

Selects a folder path.
public static Task<string?> SelectFolderAsync(string title, string? initialPath = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

title string
The picker title.
initialPath string
The path shown initially, or null to use the browser root.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the picker.

Returns

Task<string>
The selected folder path, or null when no folder is selected. Interactive and semi-interactive shells render the picker; non-interactive shells do not read input and return null.

SelectFolderResultAsync(ICliAppShell, string, string?, IFolderBrowser?, TimeSpan?, CancellationToken)

Selects a folder path and preserves the exact dialog result.
public static Task<TigerTuiResult<string>> SelectFolderResultAsync(ICliAppShell shell, string title, string? initialPath = null, IFolderBrowser? browser = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
The shell that hosts the folder picker.
title string
The picker title.
initialPath string
The path shown initially, or null to use the browser root.
browser IFolderBrowser
The folder navigation provider, or null to use the local filesystem.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the picker.

Returns

Task<TigerTuiResult<string>>
A result containing the selected folder path and exact outcome. Interactive and semi-interactive shells render the picker; non-interactive shells do not read input and return InteractionNotAllowed.

SelectFolderResultAsync(string, string?, TimeSpan?, CancellationToken)

Selects a folder path and preserves the exact dialog result.
public static Task<TigerTuiResult<string>> SelectFolderResultAsync(string title, string? initialPath = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

title string
The picker title.
initialPath string
The path shown initially, or null to use the browser root.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the picker.

Returns

Task<TigerTuiResult<string>>
A result containing the selected folder path and exact outcome. Interactive and semi-interactive shells render the picker; non-interactive shells do not read input and return InteractionNotAllowed.

SelectIndexAsync(ICliAppShell, string, IReadOnlyList<string?>, int?, CliFormattingMode, TimeSpan?, CancellationToken)

Selects the index of one label.
public static Task<int?> SelectIndexAsync(ICliAppShell shell, string title, IReadOnlyList<string?> labels, int? preselectIndex = null, CliFormattingMode itemsFormattingMode = CliFormattingMode.Raw, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
The shell that hosts the prompt.
title string
The prompt title.
labels IReadOnlyList<string>
The labels to display. A null label represents a selectable no-selection row.
preselectIndex int?
The initially selected index, or null for the first label.
itemsFormattingMode CliFormattingMode
How labels are formatted.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.

Returns

Task<int?>
The selected index, or null when no label is selected. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return null.

SelectIndexAsync(string, IReadOnlyList<string?>, int?, CliFormattingMode, TimeSpan?, CancellationToken)

Selects the index of one label.
public static Task<int?> SelectIndexAsync(string title, IReadOnlyList<string?> labels, int? preselectIndex = null, CliFormattingMode itemsFormattingMode = CliFormattingMode.Raw, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

title string
The prompt title.
labels IReadOnlyList<string>
The labels to display. A null label represents a selectable no-selection row.
preselectIndex int?
The initially selected index, or null for the first label.
itemsFormattingMode CliFormattingMode
How labels are formatted.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.

Returns

Task<int?>
The selected index, or null when no label is selected. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return null.

SelectIndexResultAsync(ICliAppShell, string, IReadOnlyList<string?>, int?, CliFormattingMode, TimeSpan?, CancellationToken)

Selects the index of one label and preserves the exact dialog result.
public static Task<TigerTuiResult<int>> SelectIndexResultAsync(ICliAppShell shell, string title, IReadOnlyList<string?> labels, int? preselectIndex = null, CliFormattingMode itemsFormattingMode = CliFormattingMode.Raw, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
The shell that hosts the prompt.
title string
The prompt title.
labels IReadOnlyList<string>
The labels to display; a null label is a selectable no-selection row.
preselectIndex int?
The initially selected index, or null for the first label.
itemsFormattingMode CliFormattingMode
How labels are formatted.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.

Returns

Task<TigerTuiResult<int>>
A result containing the selected index and exact outcome. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return InteractionNotAllowed.

SelectIndexResultAsync(string, IReadOnlyList<string?>, int?, CliFormattingMode, TimeSpan?, CancellationToken)

Selects the index of one label and preserves the exact dialog result.
public static Task<TigerTuiResult<int>> SelectIndexResultAsync(string title, IReadOnlyList<string?> labels, int? preselectIndex = null, CliFormattingMode itemsFormattingMode = CliFormattingMode.Raw, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

title string
The prompt title.
labels IReadOnlyList<string>
The labels to display; a null label is a selectable no-selection row.
preselectIndex int?
The initially selected index, or null for the first label.
itemsFormattingMode CliFormattingMode
How labels are formatted.
timeout TimeSpan?
The optional maximum time to wait for a response.
ct CancellationToken
A token that cancels the prompt.

Returns

Task<TigerTuiResult<int>>
A result containing the selected index and exact outcome. Interactive and semi-interactive shells render the prompt; non-interactive shells do not read input and return InteractionNotAllowed.

WarningAsync(ICliAppShell, string, MessageBoxButtons, string?, TimeSpan?, CancellationToken)

public static Task<DialogResultKind> WarningAsync(ICliAppShell shell, string message, MessageBoxButtons buttons = MessageBoxButtons.Ok, string? title = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

shell ICliAppShell
message string
buttons MessageBoxButtons
title string
timeout TimeSpan?
ct CancellationToken

Returns

Task<DialogResultKind>

WarningAsync(string, MessageBoxButtons, string?, TimeSpan?, CancellationToken)

Convenience wrapper over MessageBoxAsync(string, MessageBoxButtons, MessageBoxKind, string?, TimeSpan?, CancellationToken) that shows the message on the warning surface (Warning).
public static Task<DialogResultKind> WarningAsync(string message, MessageBoxButtons buttons = MessageBoxButtons.Ok, string? title = null, TimeSpan? timeout = null, CancellationToken ct = default)

Parameters

message string
buttons MessageBoxButtons
title string
timeout TimeSpan?
ct CancellationToken

Returns

Task<DialogResultKind>