In my code I have several enums with attributes used to associate extra values with them (as per https://stackoverflow.com/a/4778347/6326374). As written, accessing the attribute requires reflection.
C#9 introduced Source Generation, one of the use cases for which is replacing some reflection.
How would I use source generation to replace runtime calls to Attribute.GetCustomAttribute?