System.CommandLine mutally exclusive options
I am using System.CommandLine and I wanted to create a mutually exclusive option. The user either has to use --ipAddresses and pass in list of one or more IP addresses OR use --ipAddressesCsv and pass in a file path containing the CSV file. I am wondering if its something possible to do with System.CommandLine. This is my setup: var ipAddressesOption = new Option<IEnumerable<IPAddress>>("--ipAddresses") { Description = "The IP addresses", IsRequired = true, Arity = ArgumentArity.OneOrMore, AllowMultipleArgumentsPerToken = true, }; var ipAddressesCsvOption = new Option<FileInfo?>("--ipAddresses
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.