static void Main(string[] args) { HelperOptions options = new HelperOptions(); if (args.Length > 0) { var result = Parser.Default.ParseArguments(args, options, OnVerbCommand); if (!result) { WriteUsagesAndThrowError(options); } } else { WriteUsagesAndThrowError(options); } }
private static void WriteUsagesAndThrowError(HelperOptions options) { Console.Write(options.GetUsage()); //throw new InvalidOperationException("Please see Usages of the tool and pass the appropriate parameters"); }