Skip to content

Commit d5d755b

Browse files
authored
Merge pull request #444 from ignatandrei/rscg_idempotency
2 parents 34ae4db + f5f533d commit d5d755b

29 files changed

Lines changed: 1089 additions & 21 deletions

File tree

README.md

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
# RSCG - 251 Examples of Roslyn Source Code Generators / 16 created by Microsoft /
1+
# RSCG - 252 Examples of Roslyn Source Code Generators / 16 created by Microsoft /
22

3-
The RSCG_Examples repository is a comprehensive documentation system that automatically processes and showcases 251 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.
3+
The RSCG_Examples repository is a comprehensive documentation system that automatically processes and showcases 252 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.
44

55
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
66

7-
## Latest Update : 2025-12-18 => 18 December 2025
7+
## Latest Update : 2026-01-28 => 28 January 2026
88

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

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

1313
If you want to see by category, please click ***[category](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples)***
1414
or click any category below
15-
[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) -[bool](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#bool) -[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) -[profiler](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#profiler) -[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) -
15+
[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) -[bool](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#bool) -[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) -[idempotency](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#idempotency) -[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) -[profiler](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#profiler) -[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) -
1616

1717

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

2525
## Content
2626

27-
Those are the 251 Roslyn Source Code Generators that I have tested you can see and download source code example.
27+
Those are the 252 Roslyn Source Code Generators that I have tested you can see and download source code example.
2828
( including 16 from Microsoft )
29+
### 252. [RSCG_idempotency](https://ignatandrei.github.io/RSCG_Examples/v2/docs/RSCG_idempotency) , in the [Idempotency](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#idempotency) category
30+
31+
Generated on : 2026-01-28 => 28 January 2026
32+
33+
<details>
34+
<summary>Expand</summary>
35+
36+
37+
38+
Author: Ignat Andrei
39+
40+
Automatic generating Idempotency for function parameters
41+
42+
Nuget: [https://www.nuget.org/packages/RSCG_idempotency/](https://www.nuget.org/packages/RSCG_idempotency/)
43+
44+
45+
Link: [https://ignatandrei.github.io/RSCG_Examples/v2/docs/RSCG_idempotency](https://ignatandrei.github.io/RSCG_Examples/v2/docs/RSCG_idempotency)
46+
47+
Source: [https://github.com/ignatandrei/RSCG_idempotency](https://github.com/ignatandrei/RSCG_idempotency)
48+
49+
</details>
50+
2951
### 251. [OrderedBuildersGenerator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/OrderedBuildersGenerator) , in the [Builder](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#builder) category
3052

3153
Generated on : 2025-12-18 => 18 December 2025

later.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Just later
22

3-
## Latest Update : 2025-12-18 => 18 December 2025
3+
## Latest Update : 2026-01-28 => 28 January 2026
44

55

66

v2/.tours/RSCG_idempotency.tour

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
2+
{
3+
"$schema": "https://aka.ms/codetour-schema",
4+
"title": "RSCG_idempotency",
5+
"steps":
6+
[
7+
{
8+
"file": "rscg_examples/RSCG_idempotency/src/IdempotencyDemo/IdempotencyDemo.csproj",
9+
"description": "First, we add Nuget [RSCG_idempotency](https://www.nuget.org/packages/RSCG_idempotency/) in csproj ",
10+
"pattern": "RSCG_idempotency"
11+
}
12+
13+
,{
14+
"file": "rscg_examples/RSCG_idempotency/src/IdempotencyDemo/Purchase.cs",
15+
"description": "File Purchase.cs ",
16+
"pattern": "this is the code"
17+
}
18+
19+
,{
20+
"file": "rscg_examples/RSCG_idempotency/src/IdempotencyDemo/Program.cs",
21+
"description": "File Program.cs \r\n>> dotnet run --project rscg_examples/RSCG_idempotency/src/IdempotencyDemo/IdempotencyDemo.csproj ",
22+
"pattern": "this is the code"
23+
}
24+
25+
26+
,{
27+
"file": "rscg_examples/RSCG_idempotency/src/IdempotencyDemo/obj/GX/RSCG_idempotency/RSCG_idempotency.IPGen/TimeProvider.gen.cs",
28+
"description": "Generated File 4 from 4 : TimeProvider.gen.cs ",
29+
"line": 1
30+
}
31+
32+
,{
33+
"file": "rscg_examples/RSCG_idempotency/src/IdempotencyDemo/obj/GX/RSCG_idempotency/RSCG_idempotency.IPGen/Microsoft.CodeAnalysis.EmbeddedAttribute.cs",
34+
"description": "Generated File 3 from 4 : Microsoft.CodeAnalysis.EmbeddedAttribute.cs ",
35+
"line": 1
36+
}
37+
38+
,{
39+
"file": "rscg_examples/RSCG_idempotency/src/IdempotencyDemo/obj/GX/RSCG_idempotency/RSCG_idempotency.IPGen/IdempotentAttribute.gen.cs",
40+
"description": "Generated File 2 from 4 : IdempotentAttribute.gen.cs ",
41+
"line": 1
42+
}
43+
44+
,{
45+
"file": "rscg_examples/RSCG_idempotency/src/IdempotencyDemo/obj/GX/RSCG_idempotency/RSCG_idempotency.IPGen/IdempotencyDemo_Purchase_PurchaseNow_UniqueId.cs",
46+
"description": "Generated File 1 from 4 : IdempotencyDemo_Purchase_PurchaseNow_UniqueId.cs ",
47+
"line": 1
48+
}
49+
50+
],
51+
52+
"ref": "main"
53+
54+
}

v2/Generator/all.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,3 +250,4 @@ Nr,Key,Source,Category
250250
249,Silhouette, https://github.com/kevingosse/Silhouette,Profiler
251251
250,Facet.Search, https://github.com/Tim-Maes/Facet.Search,Database
252252
251,OrderedBuildersGenerator, https://github.com/Georgiy-Petrov/OrderedBuildersGenerator,Builder
253+
252,RSCG_idempotency, https://github.com/ignatandrei/RSCG_idempotency,Idempotency

v2/GeneratorData/Category.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,6 @@ public enum Category
4747
MCP= 42,
4848
Bool=43,
4949
Profiler=44,
50+
Idempotency=45
5051
}
5152

v2/RSCGExamplesData/GeneratorDataRec.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,5 +1521,11 @@
15211521
"Category": 4,
15221522
"dtStart": "2025-12-18T00:00:00",
15231523
"show": true
1524+
},
1525+
{
1526+
"ID":"RSCG_idempotency",
1527+
"Category":45,
1528+
"dtStart":"2026-01-28T00:00:00",
1529+
"show":true
15241530
}
15251531
]
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
2+
<h1>RSCG nr 252 : RSCG_idempotency</h1>
3+
4+
<h2>Info</h2>
5+
Nuget : <a href="https://www.nuget.org/packages/RSCG_idempotency/" target="_blank">https://www.nuget.org/packages/RSCG_idempotency/</a>
6+
7+
<p>You can find more details at : <a href="https://github.com/ignatandrei/RSCG_idempotency" target="_blank"> https://github.com/ignatandrei/RSCG_idempotency</a></p>
8+
9+
<p>Author :Ignat Andrei</p>
10+
11+
<p>Source: <a href="https://github.com/ignatandrei/RSCG_idempotency" target="_blank">https://github.com/ignatandrei/RSCG_idempotency</a> </p>
12+
13+
<h2>About</h2>
14+
15+
Generating code for idempotency
16+
17+
<h2>
18+
How to use
19+
</h2>
20+
<h3>
21+
Add reference to the <a href="https://www.nuget.org/packages/RSCG_idempotency/" target="_blank">RSCG_idempotency</a> in the csproj
22+
</h3>
23+
<img src="images/RSCG_idempotency/IdempotencyDemo.csproj.png" width="580" height="580" />
24+
25+
<h3>This was for me the <b>starting</b> code</h3>
26+
27+
<br />
28+
I have <b>coded</b> the file Program.cs
29+
<br />
30+
<img src="images/RSCG_idempotency/csFiles/Program.cs.png" width="580" height="580" />
31+
<hr />
32+
33+
<br />
34+
I have <b>coded</b> the file Purchase.cs
35+
<br />
36+
<img src="images/RSCG_idempotency/csFiles/Purchase.cs.png" width="580" height="580" />
37+
<hr />
38+
<h3>And here are the <i>generated</i> files</h3>
39+
40+
<br />
41+
The file <i>generated</i> is IdempotencyDemo_Purchase_PurchaseNow_UniqueId.cs
42+
<br />
43+
<img src="images/RSCG_idempotency/generated/IdempotencyDemo_Purchase_PurchaseNow_UniqueId.cs.png" width="580" height="580" />
44+
45+
<br />
46+
The file <i>generated</i> is IdempotentAttribute.gen.cs
47+
<br />
48+
<img src="images/RSCG_idempotency/generated/IdempotentAttribute.gen.cs.png" width="580" height="580" />
49+
50+
<br />
51+
The file <i>generated</i> is Microsoft.CodeAnalysis.EmbeddedAttribute.cs
52+
<br />
53+
<img src="images/RSCG_idempotency/generated/Microsoft.CodeAnalysis.EmbeddedAttribute.cs.png" width="580" height="580" />
54+
55+
<br />
56+
The file <i>generated</i> is TimeProvider.gen.cs
57+
<br />
58+
<img src="images/RSCG_idempotency/generated/TimeProvider.gen.cs.png" width="580" height="580" />
59+
60+
<p>
61+
You can download the code and this page as pdf from
62+
<a target="_blank" href='https://ignatandrei.github.io/RSCG_Examples/v2/docs/RSCG_idempotency'>
63+
https://ignatandrei.github.io/RSCG_Examples/v2/docs/RSCG_idempotency
64+
</a>
65+
</p>
66+
67+
68+
<p>
69+
You can see the whole list at
70+
<a target="_blank" href='https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG'>
71+
https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG
72+
</a>
73+
</p>
74+

v2/book/list.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</head>
1818
<body>
1919
<h1>
20-
This is the list of 251 RSCG with examples =>
20+
This is the list of 252 RSCG with examples =>
2121
</h1>
2222

2323
<table >
@@ -1030,6 +1030,10 @@ <h1>
10301030
<td>251</td>
10311031
<td><a href="examples/OrderedBuildersGenerator.html">OrderedBuildersGenerator</a></td>
10321032
</tr>
1033+
<tr>
1034+
<td>252</td>
1035+
<td><a href="examples/RSCG_idempotency.html">RSCG_idempotency</a></td>
1036+
</tr>
10331037
</table>
10341038

10351039

v2/book/pandocHTML.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ input-files:
265265
- examples/Silhouette.html
266266
- examples/Facet.Search.html
267267
- examples/OrderedBuildersGenerator.html
268+
- examples/RSCG_idempotency.html
268269

269270
# or you may use input-file: with a single value
270271
# defaults:
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"generator":{
3+
"name":"RSCG_idempotency",
4+
"nuget":[
5+
"https://www.nuget.org/packages/RSCG_idempotency/"
6+
],
7+
"link":"https://github.com/ignatandrei/RSCG_idempotency",
8+
"author":"Ignat Andrei",
9+
"source":"https://github.com/ignatandrei/RSCG_idempotency"
10+
},
11+
"data":{
12+
"goodFor":["Generating code for idempotency"],
13+
"csprojDemo":"IdempotencyDemo.csproj",
14+
"csFiles":["Program.cs","Purchase.cs"],
15+
"excludeDirectoryGenerated":[""],
16+
"includeAdditionalFiles":[""]
17+
},
18+
"links":{
19+
"blog":"",
20+
"video":""
21+
}
22+
}

0 commit comments

Comments
 (0)