static object Deserialize(Type t, IDeserializationContext context) { var reader = context.StreamReader; var path = ActorPath.Parse(reader.ReadString()); var system = context.ServiceProvider.GetRequiredService <IActorSystem>(); return(system.ActorOf(path)); }
/// <summary> /// Acquires the actor reference for the given actor path string. /// </summary> /// <param name="system">The reference to actor system</param> /// <param name="path">The path string</param> /// <returns>An actor reference</returns> public static ActorRef ActorOf(this IActorSystem system, string path) { return(system.ActorOf(ActorPath.Parse(path))); }