public static void Main(string[] args) { var options = new Options(); var isParsed = Parser.Default.ParseArguments(args, options); if (isParsed) { try { CheckOptions(options); var sw = Stopwatch.StartNew(); ImageConverter.Compress(options.FileToCompress, options.ThreadsCount, options.Quality); ImageConverter.Decompress(options.FileToDecompress, options.ThreadsCount, options.Quality); Console.WriteLine(sw.Elapsed.TotalMilliseconds); } catch (Exception e) { Console.WriteLine(e.Message); } } else { Console.WriteLine(options.GetUsage()); } }