You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 11, 2018. It is now read-only.
This example is taken straight out of the documentation. Doesn't matter if I explicitly set CaseSensitive = false or use the default options, "bye" will not parse to GreetType.Bye. However, "Bye" does work correctly. I tried this in version 2.0 and 2.1.
class Program
{
// Args: -g bye
static void Main(string[] args)
{
var parser = new Parser(x => x.CaseSensitive = false);
// ArgumentException: Requested value 'bye' was not found.
var result1 = parser.ParseArguments<Options>(args);
// ArgumentException: Requested value 'bye' was not found.
var result2 = CommandLine.Parser.Default.ParseArguments<Options>(args);
}
}
class Options
{
[Option('g', "greet-type")]
public GreetType SpecifiedGreetType { get; set; }
}
enum GreetType
{
Hello,
Bye,
Regards
}
This example is taken straight out of the documentation. Doesn't matter if I explicitly set
CaseSensitive = falseor use the default options, "bye" will not parse toGreetType.Bye. However, "Bye" does work correctly. I tried this in version 2.0 and 2.1.