Class TigerCliRawArgumentsAttribute
-- separator, bound literally and in order. Apply to a writable
string-collection property on a TigerCliSettings-derived type.[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public sealed class TigerCliRawArgumentsAttribute : Attribute
- Inheritance
-
TigerCliRawArgumentsAttribute
- Inherited Members
Remarks
The tail exists for commands that hand their trailing tokens to something else — a child
executable, a nested tool, a pass-through argument list. TigerCli parses only the head
of the command line (the part before --) and never inspects the tail: tail tokens are not
matched against app options, framework options such as --theme / --non-interactive,
or app-contributed global options; they are never prompted for and never validated against a
provider.
The separator itself is not part of the bound tail. Every token after it is preserved exactly,
including tokens starting with - or --, repeated tokens, empty strings, and any
later --. Only the first -- splits the command line.
Support is opt-in per command. A command whose settings type does not declare this attribute rejects a supplied tail as a usage error with the standard help hint.
public sealed class ExecSettings : TigerCliSettings
{
[TigerCliOption("--connection-string-env", Description = "Environment variable holding the connection string.")]
public string ConnectionStringEnv { get; set; } = string.Empty;
[TigerCliRawArguments(
Name = "tool-args",
Description = "Child executable and its arguments, passed through unchanged.",
Required = true)]
public IReadOnlyList<string> Arguments { get; init; } = [];
}
Invoked as app exec --connection-string-env DB_CONNECTION -- my-tool --report, the
command receives ["my-tool", "--report"].
Supported property types are string[], List<string>, and
IReadOnlyList<string>; the property must be writable (an init accessor is
fine). A settings type may declare at most one raw-argument property, and the property must not
also carry TigerCliOptionAttribute or TigerCliArgumentAttribute.
Violations are configuration errors and fail when the application is built.
Properties
Description
public string? Description { get; set; }
Property Value
DescriptionResourceKey
TigerCliAppBuilder.UseAppResources(...) against the active run culture.
When the key resolves to a non-empty string it replaces Description in help.
Missing keys silently fall back to Description; the raw key is never surfaced.public string? DescriptionResourceKey { get; set; }
Property Value
Name
-- <name>.... When not
set, a kebab-case form of the property name is used.public string? Name { get; set; }
Property Value
Required
true, the command requires at least one token after the separator. Both a missing
separator and an empty tail (app exec --) then fail with a usage error and the
MissingRequiredArgument exit mapping. The tail is never
prompted for, so a required tail fails identically in both interaction modes. The default is
false, which binds an empty collection.public bool Required { get; set; }