WithRoutees() public method

Create a new instance with the specified routees and the same RoutingLogic.
public WithRoutees ( ) : Router
return Router
Ejemplo n.º 1
0
 internal void AddRoutees(IList <Routee> routees)
 {
     foreach (var routee in routees)
     {
         Watch(routee);
     }
     _router = _router.WithRoutees(_router.Routees.Concat(routees).ToArray());
 }
Ejemplo n.º 2
0
 internal void AddRoutees(Routee[] routees)
 {
     foreach (var routee in routees)
     {
         if (routee is ActorRefRoutee)
         {
             var @ref = ((ActorRefRoutee)routee).Actor;
             Watch(@ref);
         }
     }
     _router = _router.WithRoutees(_router.Routees.Concat(routees).ToArray());
 }
Ejemplo n.º 3
0
 protected void AddRoutees(Routee[] routees)
 {
     foreach (var routee in routees)
     {
         if (routee is ActorRefRoutee)
         {
             var @ref = ((ActorRefRoutee)routee).Actor;
             Watch(@ref);
         }
     }
     Router = Router.WithRoutees(routees);
 }
Ejemplo n.º 4
0
        internal void RemoveRoutee(ActorRef actorRef, bool stopChild)
        {
            var routees = this.Router.Routees.ToList();

            routees.RemoveAll(r =>
            {
                var routee = r as ActorRefRoutee;
                if (routee != null)
                {
                    return(routee.Actor == actorRef);
                }
                return(false);
            });
            Router = Router.WithRoutees(routees.ToArray());
            if (stopChild)
            {
            }
        }