Beispiel #1
0
 internal void Initialize(string id, IActorSystem system, ActorEndpoint endpoint, ActorPrototype prototype)
 {
     Id       = id;
     System   = system;
     Endpoint = endpoint;
     _        = prototype;
 }
Beispiel #2
0
 internal void Initialize(string id, IActorSystem system, ActorEndpoint endpoint, ActorPrototype prototype)
 {
     Id = id;
     System = system;
     Endpoint = endpoint;
     Proto = prototype;
 }
Beispiel #3
0
        internal static ActorPrototype Of(Type actor)
        {
            ActorPrototype prototype = cache.Find(actor);

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

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