17
Examining Source Generators
In this chapter, we will look at writing code that generates code. Even though this chapter isn’t directly related to Blazor development, it still has a connection to Blazor, as we’ll discover.
The subject of source generators is a book on its own, but I wanted to introduce this since it is used by Blazor and, honestly, is one of my favorite features.
I am the kind of person that spends a day writing source code that saves me 10 minutes, if I know I will need to repeat those 10 minutes over and over again. Repetitive tasks have never been a favorite of mine.
In this chapter, we will cover the following:
- What a source generator is
- How to get started with source generators
- Community projects
The idea for this chapter ...
Get Web Development with Blazor - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.