Beispiel #1
0
        private static void Main(string[] args)
        {
            var prog = new Program();

            // if no date, or an invalid date, then use today's date.
            if (args.Length > 0)
            {
                var dt = args[0].ToDateTime();
                if (dt == DateTime.MinValue)
                {
                    AppLog.Error("Could not parse the date, using today's date.", args[0]);
                    dt = DateTime.Today;
                }

                prog.Start(dt);
            }
            else
            {
                AppLog.Log("No date received, using today's date.");
                prog.Start(DateTime.Today);
            }

            Pause();
        }