Boilerplate Guide to Creating a Source Generator - Part 1
Briefly

The majority of this tutorial will apply to either Visual Studio or VS Code. However, I'm not a VS Code guy so you may have to do some research on your own as to how to proceed.
Working backwards is the easiest way to create a generated object. Doing so will help you to Identify sections that need to be repeated Parts that need to be replaced dynamically Verify the final product is valid for what you need
Read at CodeProject
[
add
]
[
|
|
]