Senior SOLID

How does the Mediator pattern fit with SOLID and DI principles?

  • Mediator decouples components by centralizing communication, supporting SRP and

DIP by reducing direct dependencies.

  • It fits DI because the mediator itself can be injected where needed.
  • It supports OCP by allowing new communication routes or handlers without

modifying existing components.

  • Helps avoid tight coupling in complex workflows or CQRS patterns.

Behavioral / Conceptual Questions

More from Design Patterns in C#

All questions for this course