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
It would be great if both required and optional options could be marked as NotNull with parser throwing exception if empty value is passed. The check should work for any object type, not only strings.
Example
varp=newFluentCommandLineParser<ApplicationArguments>();p.Setup(arg =>arg.RecordId).As('r',"record").Required();p.Setup(arg =>arg.NewValue).As('v',"value").Required().NotNull();// <- ensures that -v|--value is not emptyp.Setup(arg =>arg.Silent).As('s',"silent").SetDefault(false);
Current implementation allows command line to have ---value without any actual value so 'not null or empty' checks need be done separately.
The text was updated successfully, but these errors were encountered:
It would be great if both required and optional options could be marked as NotNull with parser throwing exception if empty value is passed. The check should work for any object type, not only strings.
Example
Current implementation allows command line to have
---value
without any actual value so 'not null or empty' checks need be done separately.The text was updated successfully, but these errors were encountered: