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