DisplayVerboseOptions() публичный Метод

public DisplayVerboseOptions ( bool verboseOptions, DatabaseMakerOptions Options ) : void
verboseOptions bool
Options DatabaseMakerOptions
Результат void
Пример #1
0
        static void Main(string[] args)
        {
            var options = new DatabaseMakerOptions();

            var parser = new CommandLineParser(new CommandLineParserSettings(Console.Error));

            if (parser.ParseArguments(args, options))
            {
                var databaseMaker = new DatabaseMaker(options);

                if (options.Verbose)
                {
                    databaseMaker.DisplayVerboseOptions(options.Verbose, options);
                }

                databaseMaker.OnInvalidHeader += databaseMaker_OnInvalidHeader;

                try
                {
                    databaseMaker.CreateDatabase();
                }
                catch (ArgumentNullException e2)
                {
                    Console.WriteLine("\nError: No input files specified");
                }

                catch (ArgumentException e3)
                {
                    Console.WriteLine("\nError: " + e3.Message);
                }
                catch (Exception e)
                {
                    Console.WriteLine("Error: " + e.Message);
                }
                finally
                {
                    Console.ReadKey();
                    Environment.Exit(0);
                }
            }
            Environment.Exit(0);
        }
Пример #2
0
        static void Main(string[] args)
        {
            var options = new DatabaseMakerOptions();

            var parser = new CommandLineParser(new CommandLineParserSettings(Console.Error));
            if (parser.ParseArguments(args, options))
            {
                var databaseMaker = new DatabaseMaker(options);

                if (options.Verbose)
                {
                    databaseMaker.DisplayVerboseOptions(options.Verbose, options);
                }

                databaseMaker.OnInvalidHeader += databaseMaker_OnInvalidHeader;

                try
                {
                    databaseMaker.CreateDatabase();
                }
                catch (ArgumentNullException e2)
                {
                    Console.WriteLine("\nError: No input files specified");
                }

                catch (ArgumentException e3)
                {
                    Console.WriteLine("\nError: " + e3.Message);
                }
                catch (Exception e)
                {
                    Console.WriteLine("Error: " + e.Message);
                }
                finally
                {
                    Console.ReadKey();
                    Environment.Exit(0);
                }
            }
            Environment.Exit(0);
        }