© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
D. NesterukDesign Patterns in .NET 6https://doi.org/10.1007/978-1-4842-8245-8_15

15. Chain of Responsibility

Dmitri Nesteruk1  
(1)
St. Petersburg, c.St-Petersburg, Russia
 

Consider the typical example of corporate malpractice: insider trading. Say a particular trader has been caught red-handed trading on inside information. Who is to blame for this? If management didn’t know, it’s the trader. But maybe the trader’s peers were in on it, in which case the group manager might be the one responsible. Or perhaps the practice is institutional, in which case it’s the CEO who would take the blame.1

This is an example of a responsibility chain: you have several different ...

Get Design Patterns in .NET 6: Reusable Approaches in C# and F# for Object-Oriented Software Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.