/// <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))); }
public async Task <TResult> Send <TResult>(ActorPath actor, object message, Func <object, Task <object> > invoke) => (TResult) await invoke(message);
/// <summary> /// Acquires the actor reference for the given actor type and id. /// </summary> /// <param name="system">The reference to actor system</param> /// <param name="interface">The actor interface</param> /// <param name="id">The actor id</param> /// <returns>An actor reference</returns> public static ActorRef ActorOf(this IActorSystem system, Type @interface, string id) { return(system.ActorOf(ActorPath.For(@interface, id))); }
ActorRef(ActorPath path, IActorEndpoint endpoint) : this(path) { this.endpoint = endpoint; @interface = ActorInterface.Of(path); }
public static ActorRef Deserialize(ActorPath path) => new ActorRef(path, ActorInterface.Registered(path.Type));
/// <summary> /// Acquires the typed actor reference for the given id and type of the worker actor. /// The type could be either an interface or implementation class. /// </summary> /// <typeparam name="TActor">The type of the actor</typeparam> /// <param name="system">The reference to actor system</param> public static ActorRef <TActor> TypedWorkerOf <TActor>(this IActorSystem system) where TActor : IActorGrain { return(new ActorRef <TActor>(system.ActorOf(ActorPath.For(typeof(TActor), "#")))); }
public static ActorRef Deserialize(ActorPath path) => new ActorRef(path, ActorEndpoint.Proxy(path));
protected ActorRef(ActorPath path) { Path = path; }
internal ActorRef(ActorPath path, IActorGrain endpoint, IActorRefMiddleware middleware) : this(path) { this.endpoint = endpoint; this.middleware = middleware; }
/// <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))); }
public ActorRef ActorOf(Type type, string id) { return ActorOf(ActorPath.Registered(type, id)); }
public bool Equals(ActorPath other) { return(path.Equals(other)); }
ActorRef(ActorPath path, IActorEndpoint endpoint) : this(path) { this.endpoint = endpoint; }
ActorRef(ActorPath path, ActorInterface @interface) : this(path) { endpoint = @interface.Proxy(path); }
/// <summary> /// Acquires the actor reference for the given worker type. /// </summary> /// <param name="system">The reference to actor system</param> /// <param name="interface">The worker interface</param> /// <returns>An actor reference</returns> public static ActorRef WorkerOf(this IActorSystem system, Type @interface) { return(system.ActorOf(ActorPath.For(@interface, "#"))); }
/// <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 typed actor reference for the given id and type of the actor. /// The type could be either an interface or implementation class. /// </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> public static ActorRef <TActor> TypedActorOf <TActor>(this IActorSystem system, string id) where TActor : IActorGrain { return(new ActorRef <TActor>(system.ActorOf(ActorPath.For(typeof(TActor), id)))); }
/// <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, "#"))); }
public static ActorRef Deserialize(string path) => Deserialize(ActorPath.Deserialize(path));
ActorPlacementRequest(ActorPath path, ActorInterfaceMapping mapping) { Path = path; CustomInterface = mapping.CustomInterface; ImplementationClass = mapping.ImplementationClass; }
protected internal ActorRef(ActorPath path) { Path = path; }
public virtual Task <TResult> Send <TResult>(ActorPath actor, object message, Func <object, Task <object> > invoke) => next.Send <TResult>(actor, message, invoke);
public bool Equals(ActorPath other) => Path.Equals(other);
internal ActorRef(ActorPath path, IActorEndpoint endpoint, IActorRefInvoker invoker) : this(path) { this.endpoint = endpoint; this.invoker = invoker; }