public static ActorSelection ActorSelection(this IUntypedActorContext context, ActorMetaData targetActorMetaData) { var pathWithOutAdress = context.Self.Path.ToString().Replace(context.Self.Path.Address.ToString(), ""); var source = pathWithOutAdress.TrimStart('/').Split('/').ToList(); source.Reverse(); var target = new List <string>(); var currentActorMetaData = targetActorMetaData; while (currentActorMetaData != null) { if (currentActorMetaData.Name != null) { target.Add(currentActorMetaData.Name); } else { target.Add(null); } currentActorMetaData = currentActorMetaData.Parent; } target.Add("user"); string relativePath = CreateInterpretedRelativePath(source, target); return(context.ActorSelection(relativePath)); }
public static ActorSelection ActorSelection(this IUntypedActorContext context, ActorMetadata actor, ActorPathType path = ActorPathType.Absolute) { return(context.ActorSelection(actor.Path)); //switch (path) //{ // case ActorPathType.Absolute: // return context.ActorSelection(actor.Path); // case ActorPathType.Relative: // return context.ActorSelection(actor.RelativeUri); // default: // return context.ActorSelection(actor.AbsoluteUri); //} }
public static void Evalutate(this IUntypedActorContext context) { context.ActorSelection("/user/orch").Tell(new Evalutate()); }
public static void TellOrc(this IUntypedActorContext context, object msg) { context.ActorSelection("/user/orch").Tell(msg); }
public static ActorSelection SelectTestServiceActor(this IUntypedActorContext context, string serviceEndpoint) { return(context.ActorSelection($"akka.tcp://TestServiceSystem@{serviceEndpoint}/user/TestService")); }