๐Ÿงฉ Design Patterns with .NET / C#
Home Chapters Examples Diagrams Bibliography GitHub โ†—
  1. Home
  2. Coordinating and Traversing
Part 8 4 chapters

Coordinating and Traversing

Observer as the event keyword, Mediator and Chain of Responsibility as a pipeline, Iterator as a compiler-generated state machine, and Visitor, Memento, and Interpreter.

Chapter 21

Observer: the event keyword

The clearest case of a pattern dissolving into a language feature, and when to reach past event to IObservable.

Read โ†’
Chapter 22

Mediator and Chain of Responsibility

The pipeline shape, with Kestrel middleware mentioned once as an illustration rather than a hosting subject.

Read โ†’
Chapter 23

Iterator: yield return, LINQ, and IAsyncEnumerable

The pattern as a compiler-generated state machine, in its synchronous and asynchronous forms.

Read โ†’
Chapter 24

Visitor, Memento, and Interpreter

Pattern matching as the Visitor alternative, and expression trees as the real Interpreter.

Read โ†’
โ† Previous part Composing and Adapting Structure Next part โ†’ Idiomatic C#
Design Patterns with .NET / C#
Tutorial content: CC BY 4.0. Sample code: Apache 2.0.
Source on GitHub โ†—  ยท  File an issue โ†—