mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-16 17:02:51 +08:00
15 lines
502 B
C#
15 lines
502 B
C#
namespace Spectre.Console.Tests.Data;
|
|
|
|
public abstract class AnimalSettings : CommandSettings
|
|
{
|
|
[CommandOption("-a|--alive|--not-dead")]
|
|
[Description("Indicates whether or not the animal is alive.")]
|
|
public bool IsAlive { get; set; }
|
|
|
|
[CommandArgument(1, "[LEGS]")]
|
|
[Description("The number of legs.")]
|
|
[EvenNumberValidator("Animals must have an even number of legs.")]
|
|
[PositiveNumberValidator("Number of legs must be greater than 0.")]
|
|
public int Legs { get; set; }
|
|
}
|