Ejemplo n.º 1
0
 public ActorServer(string lName, int lPort)
 {
     _configManager          = new ActorConfigManager();
     Name                    = lName;
     Port                    = lPort;
     SerializeService        = _configManager.GetSerializeService();
     ActorTagHelper.FullHost = _configManager.Host().AbsoluteUri;
 }
Ejemplo n.º 2
0
        public static void Start(ActorConfigManager configManager)
        {
            CheckArg.ActorConfigManager(configManager);
            ActorTagHelper.FullHost = configManager.Host().Host;

            _serverInstance = new ActorServer
            {
                _configManager = configManager ?? throw new ActorException(MessageNullConfigManager),
                                       Name = configManager.Host().Host,
                                       Port = configManager.Host().Port
            };

            _serverInstance.ListenerService      = configManager.GetListenerService();
            _serverInstance.SerializeService     = configManager.GetSerializeService();
            _serverInstance.HostService          = configManager.GetHostService();
            _serverInstance.ServerCommandService = ActorConfigManager.GetServerCommandService();
            _serverInstance.DoInit(new HostRelayActor(_serverInstance.ListenerService));
        }