/// <summary> /// Resolves the actor reference. /// </summary> /// <param name="path">The path.</param> /// <returns>ActorRef.</returns> public ActorRef ResolveActorRef(string path) { if (path == "") { return(ActorRef.NoSender); } ActorPath actorPath = ActorPath.Parse(path); return(ResolveActorRef(actorPath)); }
public ActorSelection ActorSelection(string path) { if (Uri.IsWellFormedUriString(path, UriKind.Absolute)) { ActorPath actorPath = ActorPath.Parse(path); ActorRef actorRef = System.Provider.RootGuardianAt(actorPath.Address); return(new ActorSelection(actorRef, actorPath.Elements.ToArray())); } //no path given if (string.IsNullOrEmpty(path)) { return(new ActorSelection(System.DeadLetters, "")); } //absolute path if (path.Split('/').First() == "") { return(new ActorSelection(System.Provider.RootCell.Self, path.TrimStart('/'))); } return(new ActorSelection(Self, path)); }