mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-17 01:12:50 +08:00

Also moves tests to `./test` which makes it possible for all test projects to share the same .editorconfig files and similar.
18 lines
604 B
C#
18 lines
604 B
C#
using System.ComponentModel;
|
|
using Spectre.Console.Cli;
|
|
|
|
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; }
|
|
}
|
|
} |