Welcome to RoslynCodeGeneratorsMicrosoft
Press space to navigate.
Press left arrow to go back.
Press right arrow to go forward.
For content please see up menu ▲
Online at https://ignatandrei.github.io/Presentations/RoslynCodeGeneratorsMicrosoftprez.html
For download https://ignatandrei.github.io/Presentations/RoslynCodeGeneratorsMicrosoft.zip

						System.Console.WriteLine("Ignat Andrei");
						System.Console.WriteLine("RoslynCodeGeneratorsMicrosoft");							
						  

ignat Andrei Ignat http://msprogrammer.serviciipeweb.ro/

YouTube 5 minutes .NET and tools : http://bit.ly/5MinTools

Book Making Open Source Component : http://bit.ly/NetOpenSourceComponent

Book Copy Paste from StackOverflow : https://amzn.to/2PQ8EDc

Roslyn Source Code Generators with examples : https://ignatandrei.github.io/RSCG_Examples/

Monthly meetings: https://www.meetup.com/Bucharest-A-D-C-E-S-Meetup/

For notes press S
For print ?print-pdf
For all slides press ESC
Demo : RSCG_TimeBombComment.sln , https://www.nuget.org/packages/RSCG_TimeBombComment

						var syntax = context
							.SyntaxProvider.CreateSyntaxProvider(
								predicate: (sn, _) => FindCorrectComment(sn),
								transform: (ctx, _) => GetDataForGeneration(ctx)
							)
							.Where(it => it != null)
							.SelectMany((it, _) => it!)
							;

						//code
						var str=
						$$"""
						{{namespaceName}}
							
						partial class {{name}}                            
						{
							public static string FoundTimeBombComment_{{nr++}}()
							{
								return "{{item.ToFullString()}}";
							}
						}
						""";
						
						

Questions ?

Thank you for your time
https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG
Andrei Ignat http://msprogrammer.serviciipeweb.ro/