Adds an option or argument with validation.
public static TCommand Add<TCommand>(this TCommand command, string prototype, string? description, Action<string?> action, OptionValidator<string>? validate, string? envVar = null, char? envVarDelimiter = default(char? ), bool hidden = false)
where TCommand : CommandContainer
The command to add the option or argument to.
The prototype of the option or argument.
The help description.
The associated action.
The optional validator.
The optional environment variable fallback (options only).
Optional delimiter used to split multiple fallback values.
A boolean indicating if this option or argument is hidden from help.