Skip to content
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

Make CommandLineArgs parsers more generic #10

Open
dninemfive opened this issue Aug 2, 2024 · 0 comments
Open

Make CommandLineArgs parsers more generic #10

dninemfive opened this issue Aug 2, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@dninemfive
Copy link
Owner

dninemfive commented Aug 2, 2024

Currently, there is a lot of duplicate code in parsers for slightly different operations, most notably parsing all args to a type and parsing the first arg to the same type. This can likely be simplified by making the base parser signature IEnumerable<T?> Parser<T>(IEnumerable<string>? values, bool flag) and adding generic extension methods for things like .FirstValid().

@dninemfive dninemfive added the enhancement New feature or request label Aug 2, 2024
@dninemfive dninemfive self-assigned this Aug 2, 2024
@dninemfive dninemfive changed the title Make CommandLineArgs parsers more generic. Make CommandLineArgs parsers more generic Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant