Akka.Routing.SmallestMailboxRoutingLogic.Select C# (CSharp) Method

Select() public method

Picks a Routee to receive the message.
public Select ( object message, Routee routees ) : Routee
message object The message that is being routed
routees Routee A collection of routees to choose from when receiving the .
return Routee
        public override Routee Select(object message, Routee[] routees)
        {
            return routees == null || routees.Length == 0
                ? Routee.NoRoutee
                : SelectNext(routees);
        }

Usage Example

 public void SmallestMail_should_not_throw_IndexOutOfRangeException_when_counter_wraps_to_be_negative()
 {
     var routees = new[] {Routee.NoRoutee, Routee.NoRoutee, Routee.NoRoutee};
     var routingLogic = new SmallestMailboxRoutingLogic(int.MaxValue - 5);
     for (var i = 0; i < 10; i++)
     {
         routingLogic.Select(i, routees);
     }
 }