Skip to content

Conversation

WojciechNagorski
Copy link
Contributor

In this PR I would like to support validation of:

new Argument<FileInfo[]>
                {
                    Arity = ArgumentArity.ZeroOrMore
                }.ExistingOnly()

and

new Argument<DirectoryInfo[]>
                    {
                        Arity = ArgumentArity.ZeroOrMore
                    }.ExistingOnly()

I validate until I find the first error. If you want, I can always validate all values.

Thanks to this PR you can pass:
--paths file1.txt file2.txt

I want to use this feature in BenchmarkDotNet in dotnet/BenchmarkDotNet#1016. Currently It has:
https://github.com/dotnet/BenchmarkDotNet/blob/adde64cbbcde01938d6b2772066852c4f6c0e88d/src/BenchmarkDotNet/ConsoleArguments/CommandLineOptions.cs#L80-L81

@jonsequitur jonsequitur merged commit 2b6c793 into dotnet:master Jan 23, 2019
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