Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var localActorConfiguration = AppConfigActorConfiguration.Load();
            var localActor = new CenterActor(localActorConfiguration);

            var directoryConfiguration = AppConfigCenterActorDirectoryConfiguration.Load();
            var directory = new CenterActorDirectory(directoryConfiguration);

            localActor.Bootup(directory);

            while (true)
            {
                try
                {
                    string text = Console.ReadLine().ToLowerInvariant();
                    if (text == "quit" || text == "exit")
                    {
                        break;
                    }
                }
                catch (Exception ex)
                {
                    _log.Error(ex.Message, ex);
                }
            }

            localActor.Shutdown();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            NLogLogger.Use();

            ILog log = Logger.Get <Program>();

            var master = new CenterActor();

            master.Bootup();

            while (true)
            {
                try
                {
                    string text = Console.ReadLine().ToLowerInvariant();
                    if (text == "quit" || text == "exit")
                    {
                        break;
                    }
                }
                catch (Exception ex)
                {
                    log.Error(ex.Message, ex);
                }
            }

            master.Shutdown();
        }