Example #1
0
        public IActorRef Create(IActorContext actorContext, ActorSetUpOptions options = null)
        {
            var props = actorContext.DI().Props(Actortype);

            props = PrepareProps(options, props);

            return(actorContext.ActorOf(props, name: ActorName));
        }
        private static IActorRef CreateChildActor(IActorContext context, Type actorType, ActorSetUpOptions options)
        {
            var props = context.DI().Props(actorType);

            props = SelectableActor.PrepareProps(options, props);

            var actorRef = context.ActorOf(props, SelectableActor.GetActorNameByType(null, actorType));

            return(actorRef);
        }
Example #3
0
 public static IActorRef ActorOfDI <T>(this IActorContext actorContext, string name = null) where T : ActorBase
 {
     return(actorContext.ActorOf(actorContext.DI().Props <T>(), name));
 }
Example #4
0
 public IActorRef GetActor <TActor>(IActorContext context, string actorName)
     where TActor : ActorBase
 {
     return(context.ActorOf(context.DI().Props <TActor>(), actorName));
 }
 /// <inheritdoc />
 public IActorRef ActorOf <TActor>(IActorContext context, string name = null) where TActor : ActorBase
 {
     return(context.ActorOf(context.DI().Props <TActor>(), name));
 }
Example #6
0
 public Props GetProps <TActor>(IActorContext context) where TActor : ActorBase =>
 context.DI().Props <TActor>();
Example #7
0
 public Props GetProps <TActor>(IActorContext context) where TActor : ActorBase
 {
     return(context.DI().Props <TActor>());
 }