From e5b0e87bd0125d1077b77bf6bb91fb381e72a0f2 Mon Sep 17 00:00:00 2001 From: erri120 Date: Sat, 8 Feb 2020 19:03:41 +0100 Subject: [PATCH] Code cleanup --- Wabbajack.CLI/OptionsDefinition.cs | 3 +-- Wabbajack.CLI/Program.cs | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Wabbajack.CLI/OptionsDefinition.cs b/Wabbajack.CLI/OptionsDefinition.cs index 131927bc..db6c0097 100644 --- a/Wabbajack.CLI/OptionsDefinition.cs +++ b/Wabbajack.CLI/OptionsDefinition.cs @@ -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) }; } diff --git a/Wabbajack.CLI/Program.cs b/Wabbajack.CLI/Program.cs index 97f0c1d8..9d0c3236 100644 --- a/Wabbajack.CLI/Program.cs +++ b/Wabbajack.CLI/Program.cs @@ -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); } }