Skip to content

Instantly share code, notes, and snippets.

@MarcoNicolodi
Last active January 22, 2019 11:01
Show Gist options
  • Save MarcoNicolodi/8cf0ea17a7ffd23241b9017426573a4a to your computer and use it in GitHub Desktop.
Save MarcoNicolodi/8cf0ea17a7ffd23241b9017426573a4a to your computer and use it in GitHub Desktop.
Chain of responsibility
public abstract class RuleHandler {
private RuleHandler _nextRule;
public RuleHandler NextRule (RuleHandler nextRule) {
_nextRule = nextRule;
return nextRule;
}
public virtual Label Run (Request request) => _nextRule.Run(request);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment