Initialize() 공개 정적인 메소드

public static Initialize ( ) : void
리턴 void
예제 #1
0
        static void Main(string[] args)
        {
            Log.Initialize("Blaze.Server.log");
            Log.Info("Starting Blaze.Server...");

            Time.Initialize();

            try
            {
                Configuration.Load("Blaze.Server.yml");

                if (Configuration.Users == null)
                {
                    Log.Error("Users configuration was not found.");
                    return;
                }
            }
            catch (IOException)
            {
                Log.Error(string.Format("Could not open the configuration file {0}.", "Blaze.Server.yml"));
                return;
            }

            BlazeHubServer.Start();
            BlazeServer.Start();

            while (true)
            {
                try
                {
                    Log.WriteAway();
                }
                catch (Exception ex)
                {
                    Log.Error(ex.ToString());
                }

                Thread.Sleep(1000);
            }
        }