예제 #1
0
        private static void Main(string[] args)
        {
            //Register minidump dumper only if the app isn't being debugged. No use filling up hard drives with s***e
            RegisterIoC();
            LoadContentAssemblies();
            HandleCommandLineArgs();

            var server = IoCManager.Resolve <IBaseServer>();

            Logger.Log("Server -> Starting");

            if (server.Start())
            {
                Logger.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();

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

            // TODO: Move this to an interface.
            SignalHander.InstallSignals();

            server.MainLoop();

            Logger.Info("Goodbye.");

            // Used to dispose of systems that want to be disposed.
            // Such as the log manager.
            IoCManager.Clear();
        }
예제 #2
0
        private static void Main(string[] args)
        {
            //Process command-line args
            var parsedArgs = processArgs(args);
            //Register minidump dumper only if the app isn't being debugged. No use filling up hard drives with s***e


            var main = new EntryPoint();

            main._server = new SS14Server(parsedArgs);
            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");

            SignalHander.InstallSignals();

            main._server.MainLoop();
        }
예제 #3
0
        private static void Main(string[] args)
        {
#if !X64
            throw new InvalidOperationException("The server cannot start outside x64.");
#endif
            //Register minidump dumper only if the app isn't being debugged. No use filling up hard drives with s***e
            RegisterIoC();
            SetupLogging();
            InitReflectionManager();
            HandleCommandLineArgs();

            var server = IoCManager.Resolve <IBaseServer>();

            Logger.Info("Server -> Starting");

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

            string strVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString();
            Logger.Info("Server Version " + strVersion + " -> Ready");

            // TODO: Move this to an interface.
            SignalHander.InstallSignals();

            server.MainLoop();

            Logger.Info("Goodbye.");

            // Used to dispose of systems that want to be disposed.
            // Such as the log manager.
            IoCManager.Clear();
        }