roslyn-sdk
roslyn-sdk copied to clipboard
Source Generator Sample Code Gen with Roslyn API
Looking through all the sample in the repo related to source generators, they all seem to be based on a StringBuilder or similar sting based approach to constructing the generator source code.
I believe the roslyn sdk provides ways to generate C# code (SyntaxFactory, see also https://github.com/dotnet/roslyn/issues/43979)
Could somebody please add a sample (or update one) using these APIs? I believe they are recommended for a larger amount of generated source code.
After discovering: http://roslynquoter.azurewebsites.net/ - I now understand that pure SyntaxFactory alone is not a great way to go here. Any suggestions on a little bit higher level, more condensed API?