Beispiel #1
0
        Task InnerInvoke(TransportMessage message)
        {
            if (executingSteps.Count == 0)
            {
                return Task.CompletedTask;
            }

            IIncomingStep step = executingSteps.Dequeue();

            return step.Invoke(message, () => InnerInvoke(message));
        }
Beispiel #2
0
 public Task Invoke(TransportMessage message, Func<Task> next)
 {
     countdown.Signal();
     return next();
 }
Beispiel #3
0
 public Task Invoke(TransportMessage message, Func<Task> next)
 {
     Console.WriteLine(message.Id);
     return next();
 }
Beispiel #4
0
 public async Task Invoke(TransportMessage message, Func<Task> next)
 {
     await Task.Delay(1000).ConfigureAwait(false);
     await next().ConfigureAwait(false);
 }
Beispiel #5
0
 static Task Connector(IncomingPipelineFactory factory, TransportMessage message)
 {
     var pipeline = factory.Create();
     return pipeline.Invoke(message);
 }
Beispiel #6
0
 public Task Invoke(TransportMessage message)
 {
     executingSteps = new Queue<IIncomingStep>(registeredSteps);
     return InnerInvoke(message);
 }