예제 #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)));
        }
예제 #2
0
        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)));
        }
예제 #3
0
        IIncomingLogicalStepRegisterer IIncomingLogicalStepRegisterer.Register(IIncomingLogicalStep step)
        {
            registeredLogicalPipeline.Enqueue(step);

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

            return(this);
        }
예제 #5
0
        IIncomingLogicalStepRegisterer IIncomingLogicalStepRegisterer.Register(IIncomingLogicalStep step)
        {
            this.registeredLogicalPipeline.Enqueue(step);

            return(this);
        }