Exemplo n.º 1
0
        private Simulation GetOrCreateSimulation(IProjectSimulationMessage m)
        {
            var simualtionActorName = m.ProjectId.ToString();
            var simulationActor     = Context.Child(simualtionActorName) != ActorRefs.Nobody ?
                                      Context.Child(simualtionActorName) :
                                      Context.ActorOf(Props.Create(() => new TechASimulationActor(m.ProjectId)), simualtionActorName);

            return(new Simulation(m.ProjectId,
                                  simulationActor,
                                  Sender));
        }
Exemplo n.º 2
0
 private bool IsCurrentSimulation(IProjectSimulationMessage m)
 {
     return(m.ProjectId != _currentSimulation?.ProjectId);
 }