Пример #1
0
        static void Main(string[] args)
        {
            try
            {
                FileInfo fileInfo = new FileInfo("log4net.config");
                XmlConfigurator.Configure(fileInfo);

                Options options = Options.parseOptions(args);
                if (options == null)
                {
                    return;
                }

                StatisticsConsole console = new StatisticsConsole(options);

                // Run() is an async method so we have to call Wait()
                // have this thread wait for it to finish executing.
                console.Run().Wait();
            }
            catch (Exception e)
            {
                Console.WriteLine("Error!:\n" + e.Message);
                Console.WriteLine(e.StackTrace);
            }
        }
Пример #2
0
        static void Main(string[] args)
        {
            FileInfo fileInfo = new FileInfo("log4net.config");

            XmlConfigurator.Configure(fileInfo);

            Options options = Options.parseOptions(args);

            if (options == null)
            {
                return;
            }

            StatisticsConsole console = new StatisticsConsole(options);

            // Run() is an async method so we have to call Wait()
            // have this thread wait for it to finish executing.
            console.Run().Wait();
        }