Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 43 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# RSCG - 241 Examples of Roslyn Source Code Generators / 16 created by Microsoft /
# RSCG - 242 Examples of Roslyn Source Code Generators / 16 created by Microsoft /

The RSCG_Examples repository is a comprehensive documentation system that automatically processes and showcases 241 Roslyn Source Code Generator (RSCG) examples. The system transforms individual RSCG projects into structured documentation with code examples and cross-referenced content with a searchable website and code example exports.
The RSCG_Examples repository is a comprehensive documentation system that automatically processes and showcases 242 Roslyn Source Code Generator (RSCG) examples. The system transforms individual RSCG projects into structured documentation with code examples and cross-referenced content with a searchable website and code example exports.

This system serves as both a learning resource for .NET developers interested in source generators and an automated pipeline for maintaining up-to-date documentation about the RSCG ecosystem

## Latest Update : 2025-11-10 => 10 November 2025
## Latest Update : 2025-11-11 => 11 November 2025

If you want to see examples with code, please click ***[List V2](https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG)***

If you want just those from Microsoft, please click ***[Microsoft](https://ignatandrei.github.io/RSCG_Examples/v2/docs/category/microsoft-examples)***
If you want just those from Microsoft, please click ***[Microsoft](https://ignatandrei.github.io/RSCG_Examples/v2/docs/Authors/Microsoft)***

If you want to see by category, please click ***[category](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples)***
or click any category below
[actor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#actor) -[ai](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#ai) -[aop](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#aop) -[api](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#api) -[async](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#async) -[bitwise](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#bitwise) -[blazor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#blazor) -[builder](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#builder) -[clone](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#clone) -[codetostring](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#codetostring) -[commandline](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#commandline) -[console](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#console) -[constructor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#constructor) -[database](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#database) -[decorator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#decorator) -[dependencyinjection](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#dependencyinjection) -[disposer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#disposer) -[enhancementclass](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementclass) -[enhancementproject](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementproject) -[enum](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enum) -[equals](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#equals) -[filestocode](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#filestocode) -[functionalprogramming](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#functionalprogramming) -[hangfire](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#hangfire) -[interface](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#interface) -[linq](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#linq) -[mapper](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mapper) -[mediator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mediator) -[mixin](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mixin) -[mvc](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mvc) -[mvvm](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mvvm) -[optimizer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#optimizer) -[primitiveobsession](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#primitiveobsession) -[rx](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#rx) -[serializer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#serializer) -[signalr](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#signalr) -[statemachine](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#statemachine) -[templating](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#templating) -[tests](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#tests) -[validator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#validator) -[winapi](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#winapi) -
[actor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#actor) -[ai](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#ai) -[aop](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#aop) -[api](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#api) -[async](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#async) -[bitwise](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#bitwise) -[blazor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#blazor) -[builder](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#builder) -[clone](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#clone) -[codetostring](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#codetostring) -[commandline](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#commandline) -[console](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#console) -[constructor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#constructor) -[database](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#database) -[decorator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#decorator) -[dependencyinjection](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#dependencyinjection) -[disposer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#disposer) -[enhancementclass](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementclass) -[enhancementproject](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementproject) -[enum](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enum) -[equals](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#equals) -[filestocode](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#filestocode) -[functionalprogramming](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#functionalprogramming) -[hangfire](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#hangfire) -[interface](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#interface) -[linq](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#linq) -[mapper](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mapper) -[mcp](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mcp) -[mediator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mediator) -[mixin](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mixin) -[mvc](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mvc) -[mvvm](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mvvm) -[optimizer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#optimizer) -[primitiveobsession](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#primitiveobsession) -[rx](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#rx) -[serializer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#serializer) -[signalr](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#signalr) -[statemachine](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#statemachine) -[templating](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#templating) -[tests](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#tests) -[validator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#validator) -[winapi](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#winapi) -


## If you have a Roslyn Source Code Generator, please create an issue.
Expand All @@ -24,8 +24,30 @@ If you want to be notified each time I add a new RSCG example , please click htt

## Content

Those are the 241 Roslyn Source Code Generators that I have tested you can see and download source code example.
Those are the 242 Roslyn Source Code Generators that I have tested you can see and download source code example.
( including 16 from Microsoft )
### 242. [RSCG_MCP2File](https://ignatandrei.github.io/RSCG_Examples/v2/docs/RSCG_MCP2File) , in the [MCP](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mcp) category

Generated on : 2025-11-11 => 11 November 2025

<details>
<summary>Expand</summary>



Author: Ignat Andrei

Generating MCP tool function that exports to file the result of another MCP tool.

Nuget: [https://www.nuget.org/packages/RSCG_MCP2File/](https://www.nuget.org/packages/RSCG_MCP2File/)


Link: [https://ignatandrei.github.io/RSCG_Examples/v2/docs/RSCG_MCP2File](https://ignatandrei.github.io/RSCG_Examples/v2/docs/RSCG_MCP2File)

Source: [https://github.com/ignatandrei/RSCG_OpenApi2MCP](https://github.com/ignatandrei/RSCG_OpenApi2MCP)

</details>

### 241. [DecoratorGenerator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/DecoratorGenerator) , in the [Decorator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#decorator) category

Generated on : 2025-11-10 => 10 November 2025
Expand Down Expand Up @@ -1148,7 +1170,7 @@ Generated on : 2025-03-26 => 26 March 2025



Author: Andrei Ignat
Author: Ignat Andrei

Interface to null object - common

Expand Down Expand Up @@ -1346,7 +1368,7 @@ Generated on : 2025-01-18 => 18 January 2025



Author: Andrei Ignat
Author: Ignat Andrei

Interface to null object - common

Expand Down Expand Up @@ -1720,7 +1742,7 @@ Generated on : 2024-11-02 => 02 November 2024



Author: Andrei Ignat
Author: Ignat Andrei

Intercept method

Expand Down Expand Up @@ -1918,7 +1940,7 @@ Generated on : 2024-08-25 => 25 August 2024



Author: Andrei Ignat
Author: Ignat Andrei

Generates uniqe names for release

Expand Down Expand Up @@ -2203,7 +2225,7 @@ Generated on : 2024-06-29 => 29 June 2024



Author: Andrei Ignat
Author: Ignat Andrei

Implement IFormattable for a class

Expand Down Expand Up @@ -2738,7 +2760,7 @@ Generated on : 2024-02-29 => 29 February 2024



Author: Andrei Ignat
Author: Ignat Andrei

This package transforms any json into a class

Expand Down Expand Up @@ -2826,7 +2848,7 @@ Generated on : 2024-02-21 => 21 February 2024



Author: Andrei Ignat
Author: Ignat Andrei

This package wait for a time and put all global options into a cs file

Expand Down Expand Up @@ -3404,7 +3426,7 @@ Generated on : 2023-12-22 => 22 December 2023



Author: Andrei Ignat
Author: Ignat Andrei

Roslyn Utility Types - Pick, Omit

Expand Down Expand Up @@ -3470,7 +3492,7 @@ Generated on : 2023-11-29 => 29 November 2023



Author: Andrei Ignat
Author: Ignat Andrei

Package Description

Expand Down Expand Up @@ -3921,7 +3943,7 @@ Generated on : 2023-10-07 => 07 October 2023



Author: Andrei Ignat
Author: Ignat Andrei

Roslyn Templating for all

Expand Down Expand Up @@ -4075,7 +4097,7 @@ Generated on : 2023-09-30 => 30 September 2023



Author: Andrei Ignat
Author: Ignat Andrei

Roslyn Decorator for a class- intercept methods

Expand Down Expand Up @@ -4277,7 +4299,7 @@ Generated on : 2023-08-23 => 23 August 2023



Author: Andrei Ignat
Author: Ignat Andrei

Add Excel export to your WebAPI

Expand Down Expand Up @@ -4981,7 +5003,7 @@ Generated on : 2023-04-16 => 16 April 2023



Author: Andrei Ignat
Author: Ignat Andrei

Generate correct functions from [FromServices]

Expand Down Expand Up @@ -5321,7 +5343,7 @@ Generated on : 2023-04-16 => 16 April 2023



Author: Andrei Ignat
Author: Ignat Andrei

This package make you an interface and record from static properties / methods

Expand Down Expand Up @@ -5461,7 +5483,7 @@ Generated on : 2023-04-16 => 16 April 2023



Author: Andrei Ignat
Author: Ignat Andrei

This package make a time bomb from comment.

Expand Down
2 changes: 1 addition & 1 deletion later.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Just later

## Latest Update : 2025-11-10 => 10 November 2025
## Latest Update : 2025-11-11 => 11 November 2025



Expand Down
48 changes: 48 additions & 0 deletions v2/.tours/RSCG_MCP2File.tour
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

{
"$schema": "https://aka.ms/codetour-schema",
"title": "RSCG_MCP2File",
"steps":
[
{
"file": "rscg_examples/RSCG_MCP2File/src/MCPDemo/MCPDemo/MCPDemo.csproj",
"description": "First, we add Nuget [RSCG_MCP2File](https://www.nuget.org/packages/RSCG_MCP2File/) in csproj ",
"pattern": "RSCG_MCP2File"
}

,{
"file": "rscg_examples/RSCG_MCP2File/src/MCPDemo/MCPDemo/MyTools.cs",
"description": "File MyTools.cs ",
"pattern": "this is the code"
}

,{
"file": "rscg_examples/RSCG_MCP2File/src/MCPDemo/MCPDemo/Program.cs",
"description": "File Program.cs \r\n>> dotnet run --project rscg_examples/RSCG_MCP2File/src/MCPDemo/MCPDemo/MCPDemo.csproj ",
"pattern": "this is the code"
}


,{
"file": "rscg_examples/RSCG_MCP2File/src/MCPDemo/MCPDemo/obj/GX/RSCG_MCP2File/RSCG_MCP2File.MCP2File/MyTools_ExportToFile.g.cs",
"description": "Generated File 3 from 3 : MyTools_ExportToFile.g.cs ",
"line": 1
}

,{
"file": "rscg_examples/RSCG_MCP2File/src/MCPDemo/MCPDemo/obj/GX/RSCG_MCP2File/RSCG_MCP2File.MCP2File/Microsoft.CodeAnalysis.EmbeddedAttribute.cs",
"description": "Generated File 2 from 3 : Microsoft.CodeAnalysis.EmbeddedAttribute.cs ",
"line": 1
}

,{
"file": "rscg_examples/RSCG_MCP2File/src/MCPDemo/MCPDemo/obj/GX/RSCG_MCP2File/RSCG_MCP2File.MCP2File/MCPExportToFile.g.cs",
"description": "Generated File 1 from 3 : MCPExportToFile.g.cs ",
"line": 1
}

],

"ref": "main"

}
11 changes: 10 additions & 1 deletion v2/Generator/MultiGeneratorV2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -696,8 +696,17 @@ await Task.WhenAll(_AllDescriptions
if(!Directory.Exists(folder))
Directory.CreateDirectory(folder);
var nameFile = author.Key.Replace(" ","_").Replace(".","_").Replace(",","_");
nameFile= nameFile.Replace("\\","_").Replace(":","_").Replace("/","_");
var pathAuthor = Path.Combine(folder, nameFile + ".md");
await File.WriteAllTextAsync(pathAuthor, content);
try
{
await File.WriteAllTextAsync(pathAuthor, content);
}
catch(Exception ex)
{
Console.WriteLine($"cannot write author page for {author.Key} in {pathAuthor} because {ex.Message}");
throw;
}
}

return true;
Expand Down
1 change: 1 addition & 0 deletions v2/Generator/all.csv
Original file line number Diff line number Diff line change
Expand Up @@ -240,3 +240,4 @@ Nr,Key,Source,Category
239,TUnit, https://github.com/thomhurst/TUnit,Tests
240,XmlCommentGenerator, https://github.com/dotnet/dotnet/,API
241,DecoratorGenerator, https://github.com/CodingFlow/decorator-generator,Decorator
242,RSCG_MCP2File, https://github.com/ignatandrei/RSCG_OpenApi2MCP,MCP
3 changes: 2 additions & 1 deletion v2/GeneratorData/Category.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public enum Category
RX=38,
Mixin=39,
Validator=40,
Decorator= 41
Decorator= 41,
MCP= 42
}

6 changes: 6 additions & 0 deletions v2/RSCGExamplesData/GeneratorDataRec.json
Original file line number Diff line number Diff line change
Expand Up @@ -1459,5 +1459,11 @@
"Category":41,
"dtStart": "2025-11-10T00:00:00",
"show": true
},
{
"ID":"RSCG_MCP2File",
"Category": 42,
"dtStart": "2025-11-11T00:00:00",
"show": true
}
]
2 changes: 1 addition & 1 deletion v2/book/examples/InterceptorTemplate.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h2>Info</h2>

<p>You can find more details at : <a href="https://github.com/ignatandrei/RSCG_InterceptorTemplate" target="_blank"> https://github.com/ignatandrei/RSCG_InterceptorTemplate</a></p>

<p>Author :Andrei Ignat</p>
<p>Author :Ignat Andrei</p>

<p>Source: <a href="https://github.com/ignatandrei/RSCG_InterceptorTemplate" target="_blank">https://github.com/ignatandrei/RSCG_InterceptorTemplate</a> </p>

Expand Down
2 changes: 1 addition & 1 deletion v2/book/examples/RSCG_Decorator.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h2>Info</h2>

<p>You can find more details at : <a href="https://github.com/ignatandrei/RSCG_Decorator" target="_blank"> https://github.com/ignatandrei/RSCG_Decorator</a></p>

<p>Author :Andrei Ignat</p>
<p>Author :Ignat Andrei</p>

<p>Source: <a href="https://github.com/ignatandrei/RSCG_Decorator" target="_blank">https://github.com/ignatandrei/RSCG_Decorator</a> </p>

Expand Down
2 changes: 1 addition & 1 deletion v2/book/examples/RSCG_FunctionsWithDI.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h2>Info</h2>

<p>You can find more details at : <a href="https://github.com/ignatandrei/functionsdi" target="_blank"> https://github.com/ignatandrei/functionsdi</a></p>

<p>Author :Andrei Ignat</p>
<p>Author :Ignat Andrei</p>

<p>Source: <a href="https://github.com/ignatandrei/functionsdi" target="_blank">https://github.com/ignatandrei/functionsdi</a> </p>

Expand Down
2 changes: 1 addition & 1 deletion v2/book/examples/RSCG_IFormattable.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h2>Info</h2>

<p>You can find more details at : <a href="https://github.com/ignatandrei/rscg_iformattable/" target="_blank"> https://github.com/ignatandrei/rscg_iformattable/</a></p>

<p>Author :Andrei Ignat</p>
<p>Author :Ignat Andrei</p>

<p>Source: <a href="https://github.com/ignatandrei/rscg_iformattable/" target="_blank">https://github.com/ignatandrei/rscg_iformattable/</a> </p>

Expand Down
2 changes: 1 addition & 1 deletion v2/book/examples/RSCG_JSON2Class.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h2>Info</h2>

<p>You can find more details at : <a href="https://github.com/ignatandrei/RSCG_JSON2Class" target="_blank"> https://github.com/ignatandrei/RSCG_JSON2Class</a></p>

<p>Author :Andrei Ignat</p>
<p>Author :Ignat Andrei</p>

<p>Source: <a href="https://github.com/ignatandrei/RSCG_JSON2Class" target="_blank">https://github.com/ignatandrei/RSCG_JSON2Class</a> </p>

Expand Down
Loading