How would I do the equivalent of
'in_dir=s' => \@in_dirs
from Perl's Getopt::Long, i.e., a case where--in_dir
was used multiple times.
Manually, by capturing values in an intermediate list:
var dirs = new List<string> ();
var options = new OptionSet {
{ "in_dir=", v => dirs.Add (v) },
};
var unmatched = options.Parse(new[]{
"--in_dir", "A",
"something", "else",
"--in_dir=B",
});
// `dirs` contains { "A", "B" }
// `unmatched` contains { "something", "else" }
How would you define a key/value paired option? At least in the version of code I am reviewing, there is key/value paired. What is the value of Key being anything other than
System.String
? I cannot confirm that, however, as I cannot find your code base anywhere.I mean besides this: