コード例 #1
0
ファイル: ActorSystem.cs プロジェクト: nuspect/Orleankka
 /// <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)));
 }
コード例 #2
0
ファイル: ActorRefInvoker.cs プロジェクト: pkese/Orleankka
 public async Task <TResult> Send <TResult>(ActorPath actor, object message, Func <object, Task <object> > invoke) =>
 (TResult) await invoke(message);
コード例 #3
0
ファイル: ActorSystem.cs プロジェクト: nuspect/Orleankka
 /// <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)));
 }
コード例 #4
0
 ActorRef(ActorPath path, IActorEndpoint endpoint)
     : this(path)
 {
     this.endpoint = endpoint;
     @interface    = ActorInterface.Of(path);
 }
コード例 #5
0
 public static ActorRef Deserialize(ActorPath path) => new ActorRef(path, ActorInterface.Registered(path.Type));
コード例 #6
0
ファイル: ActorSystem.cs プロジェクト: nuspect/Orleankka
 /// <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), "#"))));
 }
コード例 #7
0
 public static ActorRef Deserialize(ActorPath path) => new ActorRef(path, ActorEndpoint.Proxy(path));
コード例 #8
0
ファイル: ActorRef.cs プロジェクト: stantoxt/Orleankka
 protected ActorRef(ActorPath path)
 {
     Path = path;
 }
コード例 #9
0
ファイル: ActorRef.cs プロジェクト: stantoxt/Orleankka
 internal ActorRef(ActorPath path, IActorGrain endpoint, IActorRefMiddleware middleware)
     : this(path)
 {
     this.endpoint   = endpoint;
     this.middleware = middleware;
 }
コード例 #10
0
ファイル: ActorSystem.cs プロジェクト: jfloodnet/Orleankka
 /// <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)));
 }
コード例 #11
0
ファイル: ActorSystem.cs プロジェクト: zloom/Orleankka
 public ActorRef ActorOf(Type type, string id)
 {
     return ActorOf(ActorPath.Registered(type, id));
 }
コード例 #12
0
ファイル: ActorRef.cs プロジェクト: supwar/Orleankka
 public bool Equals(ActorPath other)
 {
     return(path.Equals(other));
 }
コード例 #13
0
ファイル: ActorRef.cs プロジェクト: supwar/Orleankka
 ActorRef(ActorPath path, IActorEndpoint endpoint) : this(path)
 {
     this.endpoint = endpoint;
 }
コード例 #14
0
 ActorRef(ActorPath path, ActorInterface @interface)
     : this(path)
 {
     endpoint = @interface.Proxy(path);
 }
コード例 #15
0
ファイル: ActorSystem.cs プロジェクト: nuspect/Orleankka
 /// <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, "#")));
 }
コード例 #16
0
 /// <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)));
 }
コード例 #17
0
ファイル: ActorSystem.cs プロジェクト: nuspect/Orleankka
 /// <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))));
 }
コード例 #18
0
 /// <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, "#")));
 }
コード例 #19
0
 public static ActorRef Deserialize(string path) => Deserialize(ActorPath.Deserialize(path));
コード例 #20
0
 ActorPlacementRequest(ActorPath path, ActorInterfaceMapping mapping)
 {
     Path                = path;
     CustomInterface     = mapping.CustomInterface;
     ImplementationClass = mapping.ImplementationClass;
 }
コード例 #21
0
 protected internal ActorRef(ActorPath path)
 {
     Path = path;
 }
コード例 #22
0
ファイル: ActorRefInvoker.cs プロジェクト: pkese/Orleankka
 public virtual Task <TResult> Send <TResult>(ActorPath actor, object message, Func <object, Task <object> > invoke) =>
 next.Send <TResult>(actor, message, invoke);
コード例 #23
0
 public bool Equals(ActorPath other) => Path.Equals(other);
コード例 #24
0
ファイル: ActorRef.cs プロジェクト: pkese/Orleankka
 internal ActorRef(ActorPath path, IActorEndpoint endpoint, IActorRefInvoker invoker)
     : this(path)
 {
     this.endpoint = endpoint;
     this.invoker  = invoker;
 }