Beispiel #1
0
    public TechDay(IEventConfigurator morningConfigurator, IEventConfigurator eveningConfigurator)
    {
        MorningSlot = new Session();
        morningConfigurator.Configure(MorningSlot);

        EveningSlot = new Session();
        eveningConfigurator.Configure(EveningSlot);
    }
Beispiel #2
0
        public static void Handle <TEventData>(this IEventConfigurator <TEventData> configurator, Func <IEventContext <TEventData>, CancellationToken, Task> handler)
        {
            if (configurator is null)
            {
                throw new ArgumentNullException(nameof(configurator));
            }

            configurator.AddHandlerSpecification(new FuncEventHandlerSpecification <TEventData>(handler ?? throw new ArgumentNullException(nameof(handler))));
        }