public static ActorPath ToActorPath(this Type type, string id) { Requires.NotNull(type, nameof(type)); var key = ActorTypeName.Of(type); return(ActorPath.From(key, id)); }
public static ActorRef Resolve(string path) { return(Resolve(ActorPath.From(path))); }
public ActorRef(SerializationInfo info, StreamingContext context) { path = ActorPath.From((string)info.GetValue("path", typeof(string))); invoker = ActorEndpoint.Invoker(path); endpoint = invoker.GetProxy(path.ToString()); }
/// <summary> /// Acquires the actor reference for the given worker type. /// </summary> /// <param name="system">The reference to actor system</param> /// <param name="type">The type</param> /// <returns>An actor reference</returns> public static ActorRef WorkerOf(this IActorSystem system, string type) { return(system.ActorOf(ActorPath.From(type, "#"))); }
/// <summary> /// Acquires the actor reference for the given actor type and id. /// </summary> /// <param name="system">The reference to actor system</param> /// <param name="type">The actor type</param> /// <param name="id">The actor id</param> /// <returns>An actor reference</returns> public static ActorRef ActorOf(this IActorSystem system, string type, string id) { return(system.ActorOf(ActorPath.From(type, id))); }
/// <summary> /// Acquires the reference for the given id and type of the actor. /// </summary> /// <typeparam name="TActor">The type of the actor</typeparam> /// <param name="system">The reference to actor system</param> /// <param name="id">The id</param> /// <returns>An actor reference</returns> public static ActorRef ActorOf <TActor>(this IActorSystem system, string id) where TActor : Actor { return(system.ActorOf(ActorPath.From(typeof(TActor), id))); }