ParseArguments() private method

private ParseArguments ( string args ) : void
args string
return void
Beispiel #1
0
        public static void Main(string[] args)
        {
            Environment.ExitCode = 1;

            try
            {
                var program = new Program();
                program.ParseArguments(args);

                if (program.ShowHelp)
                {
                    ShowUsage();
                }
                else
                {
                    program.Run();
                }

                Environment.ExitCode = 0;
            }
            catch (Exception exception)
            {
                Console.WriteLine("ERROR: {0}", exception.Message);
            }
        }
Beispiel #2
0
        public static void Main(string[] args)
        {
            Environment.ExitCode = 1;

            try
            {
                var program = new Program();
                program.ParseArguments(args);

                if (program.ShowHelp)
                {
                    ShowUsage();
                }
                else
                {
                    program.Run();
                }

                Environment.ExitCode = 0;
            }
            catch (Exception exception)
            {
                Console.WriteLine("ERROR: {0}", exception.Message);
            }
        }
Beispiel #3
0
        public static void Main(string[] args)
        {
            Environment.ExitCode = 1;

            try
            {
                var program = new Program();
                program.ParseArguments(args);

                if (program.ShowHelp)
                {
                    ShowUsage();
                }
                else
                {
                    program.Run();
                }

                Environment.ExitCode = 0;
            }
            catch (Exception exception)
            {
                Console.WriteLine("ERROR: {0}", exception.Message);
                if (exception.InnerException == null)
                {
                    return;
                }
                while (exception.InnerException != null)
                {
                    exception = exception.InnerException;
                }
                Console.WriteLine("Error (InnerException): {0}", exception.Message);
            }
        }