예제 #1
0
        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);
            }
        }
예제 #2
0
 private static void WriteUsagesAndThrowError(HelperOptions options)
 {
     Console.Write(options.GetUsage());
     //throw new InvalidOperationException("Please see Usages of the tool and pass the appropriate parameters");
 }