예제 #1
0
 internal void Initialize(string id, IActorSystem system, ActorEndpoint endpoint, ActorPrototype prototype)
 {
     Id       = id;
     System   = system;
     Endpoint = endpoint;
     _        = prototype;
 }
예제 #2
0
파일: Actor.cs 프로젝트: supwar/Orleankka
 internal void Initialize(string id, IActorSystem system, ActorEndpoint endpoint, ActorPrototype prototype)
 {
     Id = id;
     System = system;
     Endpoint = endpoint;
     Proto = prototype;
 }
예제 #3
0
        internal static ActorPrototype Of(Type actor)
        {
            ActorPrototype prototype = cache.Find(actor);

            return(prototype ?? CreatePrototype(CreateInstance(actor)));
        }
예제 #4
0
 internal void Initialize(string id, IActorRuntime runtime, ActorPrototype prototype)
 {
     Id      = id;
     Runtime = runtime;
     _       = prototype;
 }
예제 #5
0
 Func <RequestEnvelope, Task <ResponseEnvelope> > Receive(object message)
 {
     return(ActorPrototype.Of(Path.Type).IsReentrant(message)
                ? (Func <RequestEnvelope, Task <ResponseEnvelope> >)endpoint.ReceiveReentrant
                : endpoint.Receive);
 }
예제 #6
0
        static Func <object, bool> DeclaredHandlerOnlyFilter(string actorCode)
        {
            var actor = ActorPrototype.Of(actorCode);

            return(x => actor.DeclaresHandlerFor(x.GetType()));
        }