Example #1
0
            public async Task Invoke(IncomingContext context, Func <Task> next)
            {
                using (var scope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
                {
                    await Task.Delay(10).ConfigureAwait(false);

                    await next().ConfigureAwait(false);

                    scope.Complete();
                }
            }
Example #2
0
        Task InnerInvoke(IncomingContext context, int currentIndex = 0)
        {
            if (currentIndex == executingElements.Count)
            {
                return Task.CompletedTask;
            }

            ILinkElement element = executingElements[currentIndex];

            return element.Invoke(context, () => InnerInvoke(context, currentIndex + 1));
        }
Example #3
0
 public async Task Invoke(IncomingContext context, Func <Task> next)
 {
     try
     {
         await next();
     }
     catch (Exception e)
     {
         e.StackTrace.Output();
     }
     countdown.Signal();
 }
Example #4
0
 public Task Invoke(IncomingContext context)
 {
     return(InnerInvoke(context));
 }
Example #5
0
 public Task Invoke(IncomingContext context)
 {
     return InnerInvoke(context);
 }
Example #6
0
 public Task Invoke(IncomingContext context, Func<Task> next)
 {
     return next();
 }
Example #7
0
            public async Task Invoke(IncomingContext context, Func<Task> next)
            {
                await Task.Delay(10).ConfigureAwait(false);

                throw new InvalidOperationException(nameof(ThrowException));
            }
Example #8
0
 public async Task Invoke(IncomingContext context, Func<Task> next)
 {
     await Task.Delay(10).ConfigureAwait(false);
     await next().ConfigureAwait(false);
 }
Example #9
0
 static Task Connector(ChainFactory factory, TransportMessage message)
 {
     var pipeline = factory.Create();
     var context = new IncomingContext(message);
     return pipeline.Invoke(context);
 }
Example #10
0
 public async Task Invoke(IncomingContext context, Func<Task> next)
 {
     try
     {
         await next();
     }
     catch (Exception e)
     {
         e.StackTrace.Output();
     }
     countdown.Signal();
 }
Example #11
0
            public async Task Invoke(IncomingContext context, Func<Task> next)
            {
                using (var scope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
                {
                    await Task.Delay(10).ConfigureAwait(false);

                    await next().ConfigureAwait(false);

                    scope.Complete();
                }
            }
Example #12
0
            public async Task Invoke(IncomingContext context, Func <Task> next)
            {
                await Task.Delay(10).ConfigureAwait(false);

                throw new InvalidOperationException(nameof(ThrowException));
            }
Example #13
0
            public async Task Invoke(IncomingContext context, Func <Task> next)
            {
                await Task.Delay(10).ConfigureAwait(false);

                await next().ConfigureAwait(false);
            }
Example #14
0
 public Task Invoke(IncomingContext context, Func <Task> next)
 {
     return(next());
 }