~/talk

C# Source Generators in Action

slides:none on file

A live demo builds a .NET Standard 2.0 source generator in about 15 minutes that removes boilerplate by generating partial types from backing fields, exemplified by an INotifyPropertyChanged generator that compiles and fires correctly, and a log decorator via generated proxy that adds before/after logging. Implementation uses Roslyn semantic model APIs, sourcegen.dev for examples, tests by compiling sample code and running generators, and notes that generators run often (about three runs per symbol), cannot modify existing auto properties, and require diagnostics and cancellation handling to be safe and fast.

AI-written summary · about

  1. 0:00Introduction
  2. 1:01Why and what are Source Generators?
  3. 4:12Demo: INotifyPropertyChanged Source Generator
  4. 22:53Source Generators vs. ...
  5. 23:20Source Generators vs. IL weaving
  6. 30:30Source Generators vs. IL generation
  7. 31:32Source Generators vs. Reflection
  8. 33:26How will generators change metaprogramming?
  9. 34:32Common problems and best practices
  10. 35:02Sharing source generators with Nuget
  11. 36:27How do source generators fit together?
  12. 1:00:50Best practices
  13. 1:01:18Summary
  14. 1:03:25Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.