Beispiel #1
0
 public async Task CallWhen(Topic topic, FlowCall.When call)
 {
     foreach (var whenMethod in When.GetMethods(call.Point.Scheduled))
     {
         await whenMethod.Call(topic, call.Point.Event, call.Services);
     }
 }
Beispiel #2
0
        async Task <Many <Event> > CallWhen()
        {
            using (var callScope = _services.CreateScope())
            {
                var call = new FlowCall.When(Point, Observation, callScope.ServiceProvider, State.CancellationToken);

                await Flow.Context.CallWhen(call);

                return(call.GetNewEvents());
            }
        }
Beispiel #3
0
        async Task CallWhen(IServiceProvider services)
        {
            var call = new FlowCall.When(Point, Observation, services, State.CancellationToken);

            await Flow.Context.CallWhen(call);

            var newEvents = call.GetNewEvents();

            if (newEvents.Count == 0)
            {
                await WriteCheckpoint();
            }
            else
            {
                await WriteAndCallImmediateGivens(newEvents);
            }
        }