private static void RunCompress(CompressArguments parsedArgs) { var client = TryGetClient(parsedArgs.ConnectionString); if (client == null) { throw new ApplicationException("Unable to open connection. Please check the connection string and try again."); } string finalMessage; RunCompressJob(client, parsedArgs.StoreName, out finalMessage); }
static void Main(string[] args) { var parsedArgs = new CompressArguments(); if (CommandLine.Parser.ParseArgumentsWithUsage(args, parsedArgs)) { try { RunCompress(parsedArgs); } catch (Exception ex) { Console.Error.WriteLine(ex.Message); } } }