コード例 #1
0
        static void Main(string[] args)
        {
            var assembly = System.Reflection.Assembly.GetEntryAssembly().GetName();

            Logger.Debug("{0} v{1} ({2}) with args: {3}", assembly.Name, assembly.Version, assembly.ProcessorArchitecture, string.Join(" ", args));
            Logger.Debug("Current Date and Time: {0} (UTC: {1})", DateTime.Now, DateTime.UtcNow);
            Parser.Default.ParseArguments <Options>(args).WithParsed(o => Arguments = o).WithNotParsed(o => Logger.Error("Unable to parse arguments: {0}", o.First().Tag));
            if (Arguments.ConsoleEnabled)
            {
                ExternalConsole.InitConsole();
            }
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Main());
            Logger.Debug("Ended");
        }