Code cleanup

This commit is contained in:
erri120 2020-02-08 19:03:41 +01:00
parent 672be2e7d0
commit e5b0e87bd0
No known key found for this signature in database
GPG Key ID: A8C0A18D8D4D3135
2 changed files with 6 additions and 7 deletions

View File

@ -5,8 +5,7 @@ namespace Wabbajack.CLI
{
public class OptionsDefinition
{
public static Type[] AllOptions = new[]
{
public static Type[] AllOptions = {
typeof(OptionsDefinition), typeof(Encrypt), typeof(Decrypt)
};
}

View File

@ -1,17 +1,17 @@
using System;
using CommandLine;
using CommandLine;
using Wabbajack.CLI.Verbs;
namespace Wabbajack.CLI
{
class Program
public class Program
{
static int Main(string[] args)
private static int Main(string[] args)
{
return CommandLine.Parser.Default.ParseArguments(args, OptionsDefinition.AllOptions)
return Parser.Default.ParseArguments(args, OptionsDefinition.AllOptions)
.MapResult(
(Encrypt opts) => Encrypt.Run(opts),
(Decrypt opts) => Decrypt.Run(opts),
(Validate opts) => Validate.Run(opts),
errs => 1);
}
}