Example #1
0
        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));
        }
Example #2
0
 /// <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)));
 }