Community projects
Source generators have been around since .NET5/6, and there are a lot of community/open-source projects we can use in our projects. Let’s explore them in the following sections.
InterfaceGenerator
We have already talked about InterfaceGenerator
. Generating interfaces without having to write the same thing twice will save time and help you avoid problems, especially if you use interfaces only for testing.
We can find it here:
https://github.com/daver32/InterfaceGenerator
Blazorators
David Pine, with many contributors, has built Blazorators, which can take a TypeScript definition file and generate JavaScript interop ready to be used in any Blazor project. Blazorators take away a lot of the pain points when writing JavaScript interop.
Check out his project here:
https://github.com/IEvangelist/blazorators
C# source generators
Amadeusz Sadowski, with many contributors, has made an impressive list of where to find more information...