public override ActorRef ResolveActorRef(ActorPath actorPath)
 {
     if (HasAddress(actorPath.Address))
     {
         if (actorPath.Elements.Head() == "remote")
         {
             if (actorPath.ToStringWithoutAddress() == "/remote")
             {
                 return(RemoteDaemon);
             }
             //skip ""/"remote",
             string[] parts = actorPath.Elements.Drop(1).ToArray();
             return(RemoteDaemon.GetChild(parts));
         }
         if (actorPath.Elements.Head() == "temp")
         {
             //skip ""/"temp",
             string[] parts = actorPath.Elements.Drop(1).ToArray();
             return(TempContainer.GetChild(parts));
         }
         //standard
         ActorCell currentContext = RootCell;
         if (actorPath.ToStringWithoutAddress() == "/")
         {
             return(currentContext.Self);
         }
         foreach (string part in actorPath.Elements)
         {
             currentContext = ((LocalActorRef)currentContext.Child(part)).Cell;
         }
         return(currentContext.Self);
     }
     return(new RemoteActorRef(Transport,
                               Transport.LocalAddressForRemote(actorPath.Address),
                               actorPath,
                               ActorRef.Nobody,
                               Props.None,
                               Deploy.None));
 }