Exemplo n.º 1
0
        public static void Main(string[] args)
        {
            AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionHandler;
            AppDomain.CurrentDomain.ProcessExit        += ProcessExitHandler;

            foreach (string arg in args)
            {
                if (StringCompare.Equals(arg, "-debug"))
                {
                    _debug = true;
                }
            }

            Logger.Seperator();
            Logger.Info("ServTK - [http://servtk.com]");

            string arguments = Arguments;

            if (arguments.Length > 0)
            {
                Logger.Info("Running with: {0}", arguments);
            }

            Logger.Seperator();

            Logger.Info("Loading Configuration Files");
            Logger.Log("Auth server IP = " + Config.Settings.Auth.Ip);
            Logger.Info("Finished Loading Configuration Files");

            Logger.Info("Acquiring Authentication Server");
            _authServer = (AuthServer)Server.Acquire(typeof(AuthServer));

            Logger.Info("Initializing Authentication Server");
            _authServer.Initialize();

            Logger.Info("Starting Authentication Server");
            _authServer.Thread.Start();

            Console.ReadLine();
        }