2020-04-06 12:04:40 +00:00
|
|
|
|
using System.Threading.Tasks;
|
2020-02-11 05:04:56 +00:00
|
|
|
|
|
|
|
|
|
namespace Wabbajack.CLI.Verbs
|
|
|
|
|
{
|
|
|
|
|
public abstract class AVerb
|
|
|
|
|
{
|
|
|
|
|
public int Execute()
|
|
|
|
|
{
|
2020-04-06 13:06:02 +00:00
|
|
|
|
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 13:06:02 +00:00
|
|
|
|
|
2020-04-06 17:14:46 +00:00
|
|
|
|
return (int)Run().Result;
|
2020-02-11 05:04:56 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-04-06 17:14:46 +00:00
|
|
|
|
protected abstract Task<ExitCode> Run();
|
2020-02-11 05:04:56 +00:00
|
|
|
|
}
|
|
|
|
|
}
|