Skip to content

Instantly share code, notes, and snippets.

Created June 25, 2020 17:11
What would you like to do?
public abstract class MessageHandler : IMessageHandler
private IMessageHandler nextHandler;
public void SetNextHandler(IMessageHandler nextHandler)
this.nextHandler = nextHandler;
public virtual async Task<Message> HandleMessage(Message sourceMessage)
return nextHandler != null ? await (nextHandler?.HandleMessage(sourceMessage)) : sourceMessage;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment