Beispiel #1
0
        Task InvokeLogical(IncomingLogicalContext context, IBusForHandler bus, int currentIndex = 0)
        {
            if (currentIndex == registeredLogicalPipeline.Count)
            {
                return(Task.CompletedTask);
            }

            IIncomingLogicalStep step = registeredLogicalPipeline[currentIndex];

            return(step.Invoke(context, bus, () => InvokeLogical(context, bus, currentIndex + 1)));
        }
        private Task InvokeLogical(IncomingLogicalContext context, IBusForHandler bus)
        {
            if (this.executingLogicalPipeline.Count == 0)
            {
                return(Task.FromResult(0));
            }

            IIncomingLogicalStep step = this.executingLogicalPipeline.Dequeue();

            return(step.Invoke(context, bus, () => this.InvokeLogical(context, bus)));
        }
        IIncomingLogicalStepRegisterer IIncomingLogicalStepRegisterer.Register(IIncomingLogicalStep step)
        {
            registeredLogicalPipeline.Enqueue(step);

            return this;
        }
Beispiel #4
0
        IIncomingLogicalStepRegisterer IIncomingLogicalStepRegisterer.Register(IIncomingLogicalStep step)
        {
            registeredLogicalPipeline.Add(step);

            return(this);
        }
        IIncomingLogicalStepRegisterer IIncomingLogicalStepRegisterer.Register(IIncomingLogicalStep step)
        {
            this.registeredLogicalPipeline.Enqueue(step);

            return(this);
        }