Example #1
0
 /// <summary>
 /// Configures the command processing pipeline
 /// </summary>
 private static void CommandsHandlingConfiguration(
     IServiceProvider provider,
     IPipeConfigurator <ICommandHandlingContext> cfg)
 {
     //Using standard GreenPipes filters
     cfg.UseInlineFilter(async(context, next) =>
     {
         //Pre-processing logic
         await next.Send(context);
         //Post-processing logic
     });
     cfg.UseRetry(retry =>
     {
         retry
         .Interval(3, TimeSpan.FromSeconds(1))
         .Handle <OptimisticLockException>();
     });
     cfg.UseFilter(new SomeCommandFilter(provider.GetService <ISingletonService>()));
 }