natemcmaster/CommandLineUtils

Documentation error in Validation sample program

AGDownie opened this issue · 2 comments

Documentation error only.

Affected sample program:
https://github.com/natemcmaster/CommandLineUtils/blob/main/docs/samples/validation/builder-api/Program.cs

These lines in this example program:

29   var importance = app.Option("-i|--importance <IMPORTANCE>", "Low, medium or high", CommandOptionType.SingleValue)
30              .Accepts().Values("low", "medium", "high");

should read:

29   var importance = app.Option("-i|--importance <IMPORTANCE>", "Low, medium or high", CommandOptionType.SingleValue)
30              .Accepts(v => v.Values("low", "medium", "high"));

As it stands the variable importance is of type IValidationBuilder? rather than the expected CommandOption?.

It would also be helpful to show this command option being used in the OnExecute() method.

To Reproduce
N/A

Expected behavior
N/A

Screenshots
N/A

Additional context
Add any other context about the problem here.

This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please comment if you believe this should remain open, otherwise it will be closed in 14 days. Thank you for your contributions to this project.

Closing due to inactivity.
If you are looking at this issue in the future and think it should be reopened, please make a commented here and mention natemcmaster so he sees the notification.