Throw errors on unrecognized input

Closes #38
Closes #24
This commit is contained in:
Alexey Golub
2020-03-16 14:48:48 +02:00
parent f38bd32510
commit c854f5fb8d
3 changed files with 72 additions and 0 deletions

View File

@@ -166,5 +166,17 @@ namespace CliFx.Tests
public ValueTask ExecuteAsync(IConsole console) => default;
}
[Command]
private class NoParameterCommand : ICommand
{
[CommandOption(nameof(OptionA))]
public string? OptionA { get; set; }
[CommandOption(nameof(OptionB))]
public string? OptionB { get; set; }
public ValueTask ExecuteAsync(IConsole console) => default;
}
}
}