Esempio n. 1
0
        private static void Main(string[] args)
        {
            //Process command-line args
            processArgs(args);
            //Register minidump dumper only if the app isn't being debugged. No use filling up hard drives with s***e
            //Minidump is Windows-only, so we need a platform check here
            if (PlatformDetector.DetectPlatform() == Platform.Windows && !System.Diagnostics.Debugger.IsAttached)
            {
                MiniDump.Register("crashdump-" + Guid.NewGuid().ToString("N") + ".dmp",
                                  fullDump
                                      ? MiniDump.MINIDUMP_TYPE.MiniDumpWithFullMemory
                                      : MiniDump.MINIDUMP_TYPE.MiniDumpNormal);
            }
            var main = new EntryPoint();

            main._server = new SS14Server();
            LogManager.Log("Server -> Starting");

            if (main._server.Start())
            {
                LogManager.Log("Server -> Can not start server", LogLevel.Fatal);
                //Not like you'd see this, haha. Perhaps later for logging.
                Environment.Exit(0);
            }

            string strVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString();

            LogManager.Log("Server Version " + strVersion + " -> Ready");

            main._server.MainLoop();
        }
Esempio n. 2
0
        private static void Main()
        {
            var args = Environment.GetCommandLineArgs();

            //Process command-line args
            processArgs(args);
            //Register minidump dumper only if the app isn't being debugged. No use filling up hard drives with s***e
            if (!System.Diagnostics.Debugger.IsAttached)
            {
                MiniDump.Register("crashdump-" + Guid.NewGuid().ToString("N") + ".dmp",
                                  fullDump
                                      ? MiniDump.MINIDUMP_TYPE.MiniDumpWithFullMemory
                                      : MiniDump.MINIDUMP_TYPE.MiniDumpNormal);
            }
            Application.Run(new MainWindow());
        }