Class TigerCliApp
A configured TigerCli command application: the immutable result of
Build(). Owns the full run pipeline — culture resolution, theme
application, command resolution, contributed global options, parsing, prompting, validation,
and handler execution — and
maps the outcome to a process exit code through the configured exit-code policy.
Create one with CreateBuilder(); instances cannot be constructed directly.
public sealed class TigerCliApp
- Inheritance
-
TigerCliApp
- Inherited Members
Properties
AppResources
Optional app-owned resource manager registered via
UseAppResources(ResourceManager), used to resolve localized enum text,
explicit metadata resource keys, and TigerCliSettings text-helper lookups
against the active run culture.
null when not configured.public ResourceManager? AppResources { get; }
Property Value
ApplicationMetadata
The single source for app display name, version, copyright, and help-footer links,
assembled from the builder's metadata calls and assembly-metadata defaults.
public TigerCliApplicationMetadata ApplicationMetadata { get; }
Property Value
CultureOptionEnabled
Whether the framework-owned
--culture option is exposed in help and parsing.
true unless DisableCultureOption() was called.public bool CultureOptionEnabled { get; }
Property Value
DefaultCulture
The UI culture used for framework strings when no
--culture override is supplied.public CultureInfo DefaultCulture { get; }
Property Value
SupportedCultures
The UI cultures the app accepts via
--culture. Always contains
DefaultCulture.public IReadOnlyList<CultureInfo> SupportedCultures { get; }
Property Value
Methods
CreateBuilder()
Creates a new TigerCliAppBuilder — the starting point for configuring and
building a TigerCli app.
public static TigerCliAppBuilder CreateBuilder()
Returns
RunAsync(string[])
Runs the app for the given command-line arguments: resolves the culture and command,
parses and binds settings, prompts for missing values when the effective interaction and
prompt modes allow, validates, executes the handler, and returns the process exit code
resolved through the configured exit-code policy. Framework failures (usage errors,
validation errors, cancellation, unhandled exceptions) are reported and mapped to exit
codes instead of throwing.
public Task<int> RunAsync(string[] args)
Parameters
argsstring[]- The raw command-line arguments, typically from
Main.
Returns
RunAsync(string[], ICliAppShell?, TimeSpan?, CancellationToken)
Runs the same pipeline as RunAsync(string[]) with an injected prompt shell,
an optional prompt timeout, and a prompt cancellation token. Hosts and tests inject a
shell (e.g. a test shell) to answer prompts without the real console; when
promptShell is null the default inline shell is used. When a
shell is injected the app does not register process/system cancellation handlers — the
host owns signal handling.public Task<int> RunAsync(string[] args, ICliAppShell? promptShell, TimeSpan? promptTimeout = null, CancellationToken ct = default)
Parameters
argsstring[]- The raw command-line arguments.
promptShellICliAppShell- The shell that hosts prompts, or
nullfor the default console shell. promptTimeoutTimeSpan?- Optional timeout applied to individual prompts;
nullmeans no timeout. ctCancellationToken- Cancellation token observed by prompts and provider callbacks, and combined with TigerCli's process/system cancellation into CancellationToken so the command handler can observe it too.