Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MediatR Pipeline Priority

How can I set the priority of PipelineBehaviors? I have 3 pipeline. I want to execute AuthorizationPipeline first. If the AuthorizationPipeline throws any SecurityException, I am not going to execute other pipelines.

like image 253
Abdulkadir KG Avatar asked Aug 31 '25 11:08

Abdulkadir KG


1 Answers

From the github wiki of MediatR: "Just register the behaviors in the order you would like them to be called."

https://github.com/jbogard/MediatR/wiki/Behaviors#registering-pipeline-behaviors

like image 77
spyros__ Avatar answered Sep 03 '25 14:09

spyros__