mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-09-16 17:35:34 +08:00
Add global usings (#668)
* Use global usings * Fix namespace declarations for test projects
This commit is contained in:
@@ -1,23 +1,20 @@
|
||||
using Spectre.Console.Cli;
|
||||
namespace Spectre.Console.Tests.Data;
|
||||
|
||||
namespace Spectre.Console.Tests.Data
|
||||
public sealed class DogSettings : MammalSettings
|
||||
{
|
||||
public sealed class DogSettings : MammalSettings
|
||||
[CommandArgument(0, "<AGE>")]
|
||||
public int Age { get; set; }
|
||||
|
||||
[CommandOption("-g|--good-boy")]
|
||||
public bool GoodBoy { get; set; }
|
||||
|
||||
public override ValidationResult Validate()
|
||||
{
|
||||
[CommandArgument(0, "<AGE>")]
|
||||
public int Age { get; set; }
|
||||
|
||||
[CommandOption("-g|--good-boy")]
|
||||
public bool GoodBoy { get; set; }
|
||||
|
||||
public override ValidationResult Validate()
|
||||
if (Name == "Tiger")
|
||||
{
|
||||
if (Name == "Tiger")
|
||||
{
|
||||
return ValidationResult.Error("Tiger is not a dog name!");
|
||||
}
|
||||
|
||||
return ValidationResult.Success();
|
||||
return ValidationResult.Error("Tiger is not a dog name!");
|
||||
}
|
||||
|
||||
return ValidationResult.Success();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user