Table of Contents

Class TigerCliAppContributionBuilder

Namespace
ItTiger.TigerCli.Commands
Assembly
ItTiger.TigerCli.dll
Builds the app-wide configuration supplied by registered ITigerCliAppContribution instances. Contributions may add optional string global options and help-only metadata for environment variables recognized by the contributing library.
public sealed class TigerCliAppContributionBuilder
Inheritance
TigerCliAppContributionBuilder
Inherited Members

Properties

GlobalOptions

Gets the builder for CLI-only, app-wide global options contributed by reusable libraries.
public TigerCliGlobalOptionBuilder GlobalOptions { get; }

Property Value

TigerCliGlobalOptionBuilder

Methods

AddEnvironmentVariable(string, string)

Adds app-wide help metadata for an environment variable recognized by the contribution. TigerCli displays the name and description in --help-env; it does not read, parse, or apply the variable.
public TigerCliAppContributionBuilder AddEnvironmentVariable(string name, string description)

Parameters

name string
The environment variable name.
description string
The help description. TigerCli markup is supported.

Returns

TigerCliAppContributionBuilder
This builder for chaining.

Exceptions

ArgumentException
name or description is null, empty, or whitespace, or name contains whitespace.
InvalidOperationException
name duplicates another contributed environment variable.

AddEnvironmentVariable(string, string, string?)

Adds app-wide help metadata with a localizable description for an environment variable recognized by the contribution. TigerCli displays the name and description in --help-env; it does not read, parse, or apply the variable.
public TigerCliAppContributionBuilder AddEnvironmentVariable(string name, string description, string? descriptionResourceKey = null)

Parameters

name string
The literal environment variable name.
description string
Fallback help description used when the resource key is absent or does not resolve. TigerCli markup is supported.
descriptionResourceKey string
Optional resource key resolved through the app ResourceManager registered via TigerCliAppBuilder.UseAppResources(...) against the active run culture. Missing or empty resource values silently fall back to description.

Returns

TigerCliAppContributionBuilder
This builder for chaining.

Exceptions

ArgumentException
name or description is null, empty, or whitespace, or name contains whitespace.
InvalidOperationException
name duplicates another contributed environment variable.