Skip to content

use explicit types for commandline parsing #711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

jmarolf
Copy link
Contributor

@jmarolf jmarolf commented Jun 29, 2020

No description provided.

@jmarolf jmarolf requested a review from JoeRobich June 29, 2020 22:03
if (!HasMatch(severityValue, out var severity))
{
// Assume that this means our arity is zero and the parser should re-parse accordingly
result.ErrorMessage = $"Cannot specify severity more than once for {result.Argument.Aliases.FirstOrDefault()}";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error message not applicable

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this possible since we mark the argument with valid values using FromAmong?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ghost ghost closed this Jul 2, 2020
@jmarolf
Copy link
Contributor Author

jmarolf commented Jul 2, 2020

This would require us to write a completely custom help presenter. I think everything should stay stringly-typed for now

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants