예제 #1
0
        public override async ValueTask <Behavior <TMessage> > Receive(IActorContext <TMessage> context, TMessage message)
        {
            var result = await Behaviors.Interpret(_first, context, message);

            if (result is UnhandledBehavior <TMessage> )
            {
                result = await Behaviors.Interpret(_second, context, message);
            }

            return(result);
        }
예제 #2
0
 public ValueTask <Behavior <TIn> > Apply <T2>(IActorContext <T2> context, ISignal signal) where T2 : class =>
 Behaviors.Interpret(_behavior, (IActorContext <TIn>)context, signal);
예제 #3
0
 public async ValueTask SignalRestart <T2>(IActorContext <T2> context) where T2 : class =>
 await Behaviors.Interpret(_behavior, (IActorContext <TIn>) context, PreRestart.Instance);
예제 #4
0
 public ValueTask <Behavior <TIn> > Apply <T2>(IActorContext <T2> context, TIn message) where T2 : class =>
 Behaviors.Interpret(_behavior, (IActorContext <TIn>)context, message);