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, 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.
The optional environment variable fallback (options only).
Optional delimiter used to split multiple fallback values.