Source Generators in Action
summary
C# 9 introduces compiler-integrated Source Generators for code generation; the talk explains what Source Generators are, how to use them, and how to expose configuration and clear diagnostic messages to users. It also covers best practices for testing and debugging generated code and compares Source Generators to existing metaprogramming tools like Fody, PostSharp and T4, noting which scenarios remain unsupported in C# 9.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 3:57What Source Generators solve
- 7:05How Source Generators work
- 10:15Live demo NotifyPropertyChanged
- 21:20Debugging and testing generators
- 28:24Source Generators vs IL Weaving
- 37:10When to use Source Generators
- 41:20Common generator problems
- 51:55Optimizing generator performance
- 1:01:10Configuring and securing generators
- 1:09:26Summary
