๐Ÿงฉ Design Patterns with .NET / C#
Home Chapters Examples Diagrams Bibliography GitHub โ†—
  1. Home
  2. Changing Inherited Code
Part 13 4 chapters

Changing Inherited Code

Seams where C# is non-virtual by default, the dependency-breaking techniques that follow, and the Fowler and Feathers contrast applied to C#.

Chapter 41

Seams in C#: non-virtual by default

The finding that inverts expectations: you cannot override to make a seam, so Feathers matters all the more in C#.

Read โ†’
Chapter 42

Dependency-breaking techniques

InternalsVisibleTo, interface extraction, DI as a seam, and virtual as an explicit opt-in.

Read โ†’
Chapter 43

Fowler vs Feathers, contrasted and combined

The refactoring catalogue and the dependency-breaking catalogue, contrasted and combined on one engine.

Read โ†’
Chapter 44

Refactor or rewrite

The judgement call, with criteria rather than a reflex.

Read โ†’
โ† Previous part Patterns in the Wild Next part โ†’ Putting It Together
Design Patterns with .NET / C#
Tutorial content: CC BY 4.0. Sample code: Apache 2.0.
Source on GitHub โ†—  ยท  File an issue โ†—