wabbajack/Wabbajack.CLI/Verbs/AVerb.cs

19 lines
461 B
C#
Raw Normal View History

2020-04-06 12:04:40 +00:00
using System.Threading.Tasks;
namespace Wabbajack.CLI.Verbs
{
public abstract class AVerb
{
public int Execute()
{
if (!CLIUtils.HasValidArguments(this))
2020-04-06 13:09:17 +00:00
CLIUtils.Exit("The provided arguments are not valid! Check previous messages for more information",
ExitCode.BadArguments);
2020-04-06 17:14:46 +00:00
return (int)Run().Result;
}
2020-04-06 17:14:46 +00:00
protected abstract Task<ExitCode> Run();
}
}