예제 #1
0
        static void Main(string[] args)
        {
            // Start!
            var timer   = Stopwatch.StartNew();
            var runMain = true;

            foreach (var arg in args)
            {
                if (arg == "test")
                {
                    runMain = false;
                    var cleaner = new DbCleaner();
                    cleaner.showSomeTests();
                }
                else if (arg == "cleandb")
                {
                    runMain = false;
                    var cleaner = new DbCleaner();
                    cleaner.CleanDb();
                }

                if (arg == "all")
                {
                    _overWriteMax = 4900000;
                    SeedStore.GenerateSQLFiles = true;
                }

                if (arg == "nocopy")
                {
                    _copyToOutputLocation = false;
                }

                if (arg == "temp")
                {
                    runMain = false;
                    var temp = new Temp();
                    temp.DoSomething();
                }
            }

            if (runMain)
            {
                MainRun();
            }

            timer.Stop();
            TimeSpan timespan = timer.Elapsed;

            Console.WriteLine("Completed! took " + String.Format("{0:00}:{1:00}:{2:00}", timespan.Minutes, timespan.Seconds, timespan.Milliseconds / 10));
        }