mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
18 lines
471 B
C#
18 lines
471 B
C#
using CliFx.Attributes;
|
|
using CliFx.Models;
|
|
|
|
namespace CliFx.Tests.TestObjects
|
|
{
|
|
[DefaultCommand]
|
|
[Command("command")]
|
|
public class TestCommand : Command
|
|
{
|
|
[CommandOption("int", 'i', IsRequired = true)]
|
|
public int IntOption { get; set; } = 24;
|
|
|
|
[CommandOption("str", 's')]
|
|
public string StringOption { get; set; } = "foo bar";
|
|
|
|
public override ExitCode Execute() => new ExitCode(IntOption, StringOption);
|
|
}
|
|
} |