4using System.Collections.Generic;
5using System.Globalization;
17 IEnumerable<Type> types,
18 IEnumerable<string> arguments,
19 bool multiInstance =
false)
25 StringComparer.Ordinal,
27 CultureInfo.InvariantCulture,
77 new[] {
"help",
"commit" });
94 new[] {
"help",
"earthunderalienattack" });
106 var expected =
new Add_Verb { Patch =
true, FileName =
"dummy.bin"};
111 new[] {
"add",
"--patch",
"dummy.bin" });
128 new[] {
"add",
"--patch",
"dummy.bin" });
140 var expected =
new SequenceOptions { LongSequence =
new long[] { }, StringSequence =
new[] {
"aa",
"b" } };
145 new[] {
"sequence",
"-s",
"aa",
"b" });
154 [InlineData(
new[] {
"sequence",
"-s",
"here-one-elem-but-no-sep" },
new[] {
"here-one-elem-but-no-sep" })]
155 [InlineData(
new[] {
"sequence",
"-shere-one-elem-but-no-sep" },
new[] {
"here-one-elem-but-no-sep" })]
156 [InlineData(
new[] {
"sequence",
"-s",
"eml1@xyz.com,test@unit.org,xyz@srv.it" },
new[] {
"eml1@xyz.com",
"test@unit.org",
"xyz@srv.it" })]
157 [InlineData(
new[] {
"sequence",
"-sInlineData@iscool.org,test@unit.org,xyz@srv.it,another,the-last-one" },
new[] {
"InlineData@iscool.org",
"test@unit.org",
"xyz@srv.it",
"another",
"the-last-one" })]
161 var expected =
new SequenceOptions { LongSequence =
new long[] { }, StringSequence = expectedString };
177 var expected =
new SequenceOptions { LongSequence =
new long[] { }, StringSequence =
new[] {
"s1",
"s2" } };
180 new[] {
"sequence",
"-s",
"s1",
"-s",
"s2" },
static ParserResult< object > Choose(Func< IEnumerable< string >, IEnumerable< OptionSpecification >, Result< IEnumerable< Token >, Error > > tokenizer, IEnumerable< Type > types, IEnumerable< string > arguments, StringComparer nameComparer, bool ignoreValueCase, CultureInfo parsingCulture, bool autoHelp, bool autoVersion, IEnumerable< ErrorType > nonFatalErrors)
static Func< IEnumerable< string >, IEnumerable< OptionSpecification >, Result< IEnumerable< Token >, Error > > ConfigureTokenizer(StringComparer nameComparer, bool ignoreUnknownArguments, bool enableDashDash)
Models an error generated when a user explicitly requests help in verb commands scenario.
Models an error generated when no verb is selected.
It contains a sequence of CommandLine.Error.
It contains an instance of type T with parsed values.
Models a parser result. When inherited by CommandLine.Parsed<T>, it contains an instance of type T w...
void Parse_sequence_verb_with_separator_returns_verb_instance(string[] arguments, string[] expectedString)
void Parse_empty_array_returns_NullInstance()
void Parse_existing_verb_returns_verb_instance()
void Explicit_help_request_for_a_valid_verb_generates_HelpVerbRequestedError_with_appropriate_data()
void Explicit_help_request_for_an_invalid_verb_generates_HelpVerbRequestedError_with_Matched_set_to_false()
void Parse_existing_verb_returns_verb_immutable_instance()
void Parse_sequence_verb_returns_verb_instance()
void Explicit_help_request_generates_HelpVerbRequestedError()
static ParserResult< object > InvokeChoose(IEnumerable< Type > types, IEnumerable< string > arguments, bool multiInstance=false)
void Parse_sequence_verb_with_multi_instance_returns_verb_instance()
ErrorType
Discriminator enumeration of CommandLine.Error derivates.