public NetworkActorProvider(ActorSystem actorSystem, IUnitOfWork unitOfWork, IHttpService httpService, ILogger <NetworkActorProvider> logger) { this.logger = logger; var actorProps = NetworkActor.Props(unitOfWork, httpService).WithRouter(new RoundRobinPool(5)); actor = actorSystem.ActorOf(actorProps, "network-actor"); }
public static void RegisterActor(NetworkActor obj) { var index = obj.actor_id; if (index >= Objects.Length) { var size = Math.Min(Objects.Length * 2, NetworkActor.MaxId); var newObjects = new NetworkActor[size]; Array.Copy(Objects, newObjects, Objects.Length); Objects = newObjects; } MaxIndex = Math.Max(MaxIndex, index); Objects[index] = obj; ++Count; }
public static void RegisterActor(NetworkActor obj) { var index = obj.actor_id; if (index >= Objects.Length) { var size = Math.Min(Objects.Length * 2, NetworkActor.MaxId); var newObjects = new NetworkActor[size]; Array.Copy(Objects, newObjects, Objects.Length); Objects = newObjects; } MaxIndex = Math.Max(MaxIndex, index); Objects[index] = obj; ++Count; }
public static void UnregisterActor(NetworkActor obj) { Objects[obj.actor_id] = null; --Count; }
public BettingActor(NetworkActor networkActor) { Rules = new List <BettingRule>(); NetworkActor = networkActor; }
public static void UnregisterActor(NetworkActor obj) { Objects[obj.actor_id] = null; --Count; }