This extension allows a more expressive way to order handlers. HandlerOrdering allows the dependency between handlers to be expressed via interfaces and the resulting order is derived at runtime.
Already a Patron? skip past this section
It is expected that all developers become a Patron to use any of these libraries. Go to licensing FAQ
Support this project by becoming a Sponsors. The company avatar will show up here with a link to your website. The avatar will also be added to all GitHub repositories under this organization.
Thanks to all the backing developers! Support this project by becoming a patron.
endpointConfiguration.ApplyInterfaceHandlerOrdering();
public class MessageHandler1 :
IHandleMessages<MyMessage>,
IWantToRunAfter<MessageHandler3>
{
public class MessageHandler1 :
IHandleMessages<MyMessage>,
IWantToRunAfter<MessageHandler3>
{
public class MessageHandler2 :
IHandleMessages<MyMessage>,
IWantToRunAfter<MessageHandler1>
{
public class MessageHandler2 :
IHandleMessages<MyMessage>,
IWantToRunAfter<MessageHandler1>
{
- MessageHandler3
- MessageHandler1
- MessageHandler2
The sample demonstrates how to use interfaces to express dependencies between handlers.
endpointConfiguration.ApplyInterfaceHandlerOrdering();
public class MessageHandler1 :
IHandleMessages<MyMessage>,
IWantToRunAfter<MessageHandler3>
{
public class MessageHandler1 :
IHandleMessages<MyMessage>,
IWantToRunAfter<MessageHandler3>
{
public class MessageHandler2 :
IHandleMessages<MyMessage>,
IWantToRunAfter<MessageHandler1>
{
public class MessageHandler2 :
IHandleMessages<MyMessage>,
IWantToRunAfter<MessageHandler1>
{
- MessageHandler3
- MessageHandler1
- MessageHandler2
See closed milestones.
Icon courtesy of The Noun Project