Example #1
0
        public static void InitAddon(WCellAddonContext context)
        {
            var mgr = new InitMgr();

            InitAddon(context, mgr);
            mgr.PerformInitialization();
        }
Example #2
0
 /// <summary>
 /// Starts the server and performs and needed initialization.
 /// </summary>
 public virtual void Start()
 {
     if (_running)
     {
         return;
     }
     if (InitMgr.PerformInitialization())
     {
         _tcpEndpoint = new IPEndPoint(Utility.ParseOrResolve(Host), Port);
         Start(true, false);
         if (!(_running = TcpEnabledEnabled))
         {
             Log.Fatal(WCell_Core.InitFailed);
             Stop();
         }
         else
         {
             Log.Info("Server started - Max Working Set Size: {0}",
                      Process.GetCurrentProcess().MaxWorkingSet);
             UpdateTitle();
             Action started = Started;
             if (started == null)
             {
                 return;
             }
             started();
         }
     }
     else
     {
         Log.Fatal(WCell_Core.InitFailed);
         Stop();
     }
 }
Example #3
0
        public static void InitAddon(WCellAddonContext context)
        {
            InitMgr mgr = new InitMgr();

            RealmAddonMgr.InitAddon(context, mgr);
            mgr.AddGlobalMgrsOfAsm(typeof(RealmAddonMgr).Assembly);
            mgr.PerformInitialization();
        }
Example #4
0
        /// <summary>
        /// Starts the server and performs and needed initialization.
        /// </summary>
        public virtual void Start()
        {
            if (_running)
            {
                return;
            }

            if (InitMgr.PerformInitialization())
            {
                var address = Utility.ParseOrResolve(Host);

                _tcpEndpoint = new IPEndPoint(address, Port);

                Start(true, false);

                if (!(_running = TcpEnabledEnabled))
                {
                    Log.Fatal(Resources.InitFailed);
                    Stop();
                    return;
                }

                Log.Info("Server started - Max Working Set Size: {0}", Process.GetCurrentProcess().MaxWorkingSet);
                //GC.Collect(2, GCCollectionMode.Optimized);
                UpdateTitle();

                var evt = Started;
                if (evt != null)
                {
                    evt();
                }
            }
            else
            {
                Log.Fatal(Resources.InitFailed);
                Stop();
            }
        }