Example #1
0
        public TestActor()
        {
            // A server
            var discoverServers = new string[] {"http://127.0.0.1:4001"};
            var actorConf = new ActorNodeConfig()
            {
                Name = "Actor-Test-A",
                DiscoveryParam = discoverServers,
                ActorClass = "CosmosTest.SampleActor, Cosmos.Test",
            };
            _actorA = ActorRunner.Run(actorConf);
            Assert.AreEqual(_actorA.State, ActorRunState.Running);

            // B Server
            var actorConfB = new ActorNodeConfig()
            {
                Name = "Actor-Test-B",
                DiscoveryParam = discoverServers,
                ActorClass = "CosmosTest.SampleActor, Cosmos.Test",
            };
            _actorB = ActorRunner.Run(actorConfB);
            Assert.AreEqual(_actorB.State, ActorRunState.Running);
        }
Example #2
0
        public static ActorRunner Run(ActorNodeConfig conf)
        {
            ActorRunner runner = new ActorRunner(conf);

            return(runner);
        }
Example #3
0
 public static ActorRunner Run(ActorNodeConfig conf)
 {
     ActorRunner runner = new ActorRunner(conf);
     return runner;
 }