// ReSharper restore InconsistentNaming
        private static void Main()
        {
            Console.TreatControlCAsInput = false;
            Console.CancelKeyPress += CtrlC;

            Logger log = new Logger(Config.LogFolder);

            sv = new Server(log, Config.Port);
            sv.Start();

            Console.Title = "";
        }
        /// <summary>
        ///   Constructor
        /// </summary>
        /// <param name="log"> Logger instance </param>
        /// <param name="port"> Port to listen on </param>
        internal Server(Logger log, int port = 9993)
        {
            _server = this;
            _log = log;
            _database = new Database(Config.DbHost, Config.DbUser, Config.DbPass, Config.DbName, _log);
            _localNetService = new LocalNetworkService(log, Config.LocalNetPort);
            _netService = new NetworkService(log, port);

            Console.Clear();
            Console.Title = string.Format("Metin2 Auth Server Emulator [Version {0}]",
                                          Assembly.GetExecutingAssembly().GetName().Version);

            Console.WriteLine("Metin2 Auth Server Emulator [Version {0}]\n",
                              Assembly.GetExecutingAssembly().GetName().Version);
        }