Skip to content

Commit

Permalink
If option is nullable, then let the parser itself decide if an empty …
Browse files Browse the repository at this point in the history
…value is valid. For example a nullable bool that is provided but no explicit value is valid as a default for true
  • Loading branch information
siywilliams committed Nov 25, 2017
1 parent 0f6ba15 commit 5a5f9d9
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public NullableCommandLineOptionParser(ICommandLineOptionParserFactory parserFac
/// </summary>
public TNullableType? Parse(ParsedOption parsedOption)
{
if (parsedOption.HasValue == false) return null;
var parser = _parserFactory.CreateParser<TNullableType>();
if (parser.CanParse(parsedOption) == false) return null;
return parser.Parse(parsedOption);
Expand Down

0 comments on commit 5a5f9d9

Please sign in to comment.