Akka.Actor.LocalActorRefProvider.ResolveActorRef C# (CSharp) 메소드

ResolveActorRef() 공개 메소드

Resolves the actor reference.
The provided actor path is not valid in the LocalActorRefProvider
public ResolveActorRef ( ActorPath path ) : IActorRef
path ActorPath The actor path.
리턴 IActorRef
        public IActorRef ResolveActorRef(ActorPath path)
        {
            if(path.Root == _rootPath)
                return ResolveActorRef(_rootGuardian, path.Elements);
            _log.Debug("Resolve of foreign ActorPath [{0}] failed", path);
            return _deadLetters;

            //Used to be this, but the code above is what Akka has
            //if(_rootPath.Address==actorPath.Address)
            //{
            //    if(actorPath.Elements.Head() == "temp")
            //    {
            //        //skip ""/"temp", 
            //        string[] parts = actorPath.Elements.Drop(1).ToArray();
            //        return _tempContainer.GetChild(parts);
            //    }
            //    //standard
            //    ActorCell currentContext = _rootGuardian.Cell;
            //    foreach(string part in actorPath.Elements)
            //    {
            //        currentContext = ((LocalActorRef)currentContext.Child(part)).Cell;
            //    }
            //    return currentContext.Self;
            //}
            //throw new NotSupportedException("The provided actor path is not valid in the LocalActorRefProvider");
        }

Same methods

LocalActorRefProvider::ResolveActorRef ( string path ) : IActorRef
LocalActorRefProvider::ResolveActorRef ( IInternalActorRef actorRef, IReadOnlyCollection pathElements ) : IInternalActorRef