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

Sequences that hit max should stop grabbing values #682

Merged
merged 1 commit into from
Aug 19, 2020

Conversation

rmunn
Copy link
Contributor

@rmunn rmunn commented Aug 19, 2020

Once a sequence option that has Max=N has hit N values, it will stop grabbing values from the command line, and any remaining values will be able to be assigned to other properties with the Value attribute.

Fixes #681.

Two unit tests had incorrect semantics, as discussed in #681, so this also changes those two tests to expect the correct behavior for sequences with Max=N. I also fixed a spelling mistake (gererates instead of generates) while I was working in the InstanceBuilderTests.cs file on one of those two unit tests.

If a sequence option (one with IEnumerable or similar type) has a Max=N
assigned, then once it has hit N values it will stop grabbing values
from the command line, and any remaining values will be able to be
assigned to other properties with the Value attribute.
@moh-hassan
Copy link
Collaborator

Thanks @rmunn for this fix.

@moh-hassan moh-hassan merged commit 889ac3b into commandlineparser:develop Aug 19, 2020
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