Class TigerCliAppContributionBuilder
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
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
namestring- The environment variable name.
descriptionstring- The help description. TigerCli markup is supported.
Returns
- TigerCliAppContributionBuilder
- This builder for chaining.
Exceptions
- ArgumentException
nameordescriptionis null, empty, or whitespace, ornamecontains whitespace.- InvalidOperationException
nameduplicates 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
namestring- The literal environment variable name.
descriptionstring- Fallback help description used when the resource key is absent or does not resolve. TigerCli markup is supported.
descriptionResourceKeystring- 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 todescription.
Returns
- TigerCliAppContributionBuilder
- This builder for chaining.
Exceptions
- ArgumentException
nameordescriptionis null, empty, or whitespace, ornamecontains whitespace.- InvalidOperationException
nameduplicates another contributed environment variable.