When registering IRequestPreProcessors and IRequestPostProcessors implicitly like the example in the readme:
services.AddMediatR(cfg => {
cfg.RegisterServicesFromAssembly(typeof(Startup).Assembly)
.AddOpenBehavior(typeof(MyBehavior<,>));
});
is it possible to specify the order in which they're run when there are multiple preprocessors, or multiple post processors? There doesn't seem to be anything in the wiki that allows for this.
Currently if I register them explicitly:
services.AddMediatR(cfg => {
cfg.RegisterServicesFromAssembly(typeof(Startup).Assembly);
.AddBehavior(typeof(IRequestPreProcessor<>), typeof(MyFirstPreProcessor<>))
.AddBehavior(typeof(IRequestPreProcessor<>), typeof(MySecondPreProcessor<>))
.AddOpenBehavior(typeof(MyBehavior<,>))
.AddBehavior(typeof(IRequestPostProcessor<,>), typeof(MyFirstPostProcessor<,>))
.AddBehavior(typeof(IRequestPostProcessor<,>), typeof(MySecondPostProcessor<,>));
})
the preprocessors and the postprocessors run twice, due to them already having been registered implicitly.
When registering
IRequestPreProcessors andIRequestPostProcessors implicitly like the example in the readme:is it possible to specify the order in which they're run when there are multiple preprocessors, or multiple post processors? There doesn't seem to be anything in the wiki that allows for this.
Currently if I register them explicitly:
the preprocessors and the postprocessors run twice, due to them already having been registered implicitly.