Part 9
5 chapters
Idiomatic C#
Extension members, expression trees, source generators, Roslyn analyzers, and static abstract members: the C# machinery behind the book's most research-heavy part.
Chapter 25
Extension methods and C# 14 extension members
Extension properties, static extension members, and operators, used to decorate or adapt a type you do not own.
Chapter 26
Expression trees: code as data
Code as inspectable data at runtime: how LINQ providers work, and how to build and inspect trees.
Chapter 27
Source generators: patterns at build time
Replacing reflection-based factories, registries, and mappers at build time, and the AOT and trimming argument.
Chapter 28
Roslyn analyzers: patterns enforced at compile time
Encoding a design rule as a build error, and the concrete landing point for the AI throughline.
Chapter 29
static abstract members and generic math
Constraining a generic over type-level operations with abstract static interface members and generic math over a custom value type.