You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building error messages during validation it may be helpful to refer to arguments by name in order to explain why parsing failed. Example:
Cannot use both -d/--delete and --move at the same time.
We already have the ability to refer to a strongly-typed name and value (e.g. nameof(opt.Delete) and opt.Delete), but the flags must be hardcoded. If we could pull them from the config, whenever it changes the validation message would automatically match.
Some notes:
Need the ability to access sub-config of verbs
Need to retrieve both the short and long names of a NamedArgument
Need to retrieve the meta name of a PositionalArgument
We might want to provide a facade over the complexity of IParserConfig and the IArguments and let users retrieve by name/namespace (e.g. config.GetArgumentFlags<Options>(opt => opt.Delete) == "-d/--delete"
The text was updated successfully, but these errors were encountered:
When building error messages during validation it may be helpful to refer to arguments by name in order to explain why parsing failed. Example:
We already have the ability to refer to a strongly-typed name and value (e.g.
nameof(opt.Delete)
andopt.Delete
), but the flags must be hardcoded. If we could pull them from the config, whenever it changes the validation message would automatically match.Some notes:
config.GetArgumentFlags<Options>(opt => opt.Delete) == "-d/--delete"
The text was updated successfully, but these errors were encountered: