Enhance option converter and add support for array options

This commit is contained in:
Alexey Golub
2019-06-09 21:57:30 +03:00
parent e0211fc141
commit 63d798977d
18 changed files with 399 additions and 115 deletions

View File

@@ -8,10 +8,10 @@ namespace CliFx.Tests.Dummy.Commands
[DefaultCommand]
public class DefaultCommand : Command
{
[CommandOption("target", ShortName = 't', Description = "Greeting target.")]
[CommandOption("target", 't', Description = "Greeting target.")]
public string Target { get; set; } = "world";
[CommandOption("enthusiastic", ShortName = 'e', Description = "Whether the greeting should be enthusiastic.")]
[CommandOption('e', Description = "Whether the greeting should be enthusiastic.")]
public bool IsEnthusiastic { get; set; }
public override ExitCode Execute()