Skip to content

Commit 74fd17b

Browse files
authored
Merge pull request #509 from ignatandrei/495-httpsgithubcomikuzakikuzokdirge
first iteration
2 parents ac79bfa + a61b17e commit 74fd17b

28 files changed

Lines changed: 1137 additions & 22 deletions

File tree

README.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# RSCG - 273 Examples of Roslyn Source Code Generators / 16 created by Microsoft /
1+
# RSCG - 274 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 273 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 274 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 : 2026-06-30 => 30 June 2026
7+
## Latest Update : 2026-07-01 => 01 July 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

@@ -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 273 Roslyn Source Code Generators that I have tested you can see and download source code example.
27+
Those are the 274 Roslyn Source Code Generators that I have tested you can see and download source code example.
2828
( including 16 from Microsoft )
29+
### 274. [Dirge](https://ignatandrei.github.io/RSCG_Examples/v2/docs/Dirge) , in the [Disposer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#disposer) category
30+
31+
Generated on : 2026-07-01 => 01 July 2026
32+
33+
<details>
34+
<summary>Expand</summary>
35+
36+
37+
38+
Author: Kazuki Kohzuki
39+
40+
Disposable Implementation Roslyn Generator Extension
41+
42+
Nuget: [https://www.nuget.org/packages/Dirge/](https://www.nuget.org/packages/Dirge/)
43+
44+
45+
Link: [https://ignatandrei.github.io/RSCG_Examples/v2/docs/Dirge](https://ignatandrei.github.io/RSCG_Examples/v2/docs/Dirge)
46+
47+
Source: [https://github.com/IkuzakIkuzok/Dirge](https://github.com/IkuzakIkuzok/Dirge)
48+
49+
</details>
50+
2951
### 273. [ScottEncodingGenerator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/ScottEncodingGenerator) , in the [FunctionalProgramming](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#functionalprogramming) category
3052

3153
Generated on : 2026-06-30 => 30 June 2026

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 : 2026-06-30 => 30 June 2026
3+
## Latest Update : 2026-07-01 => 01 July 2026
44

55

66

v2/Generator/all.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,3 +272,4 @@ Nr,Key,Source,Category
272272
271,TypedStateBuilder.Generator, https://github.com/Georgiy-Petrov/TypedStateBuilder.Generator,Builder
273273
272,AlephMapper, https://github.com/Raffinert/AlephMapper,Database
274274
273,ScottEncodingGenerator, https://github.com/Georgiy-Petrov/ScottEncodingGenerator,FunctionalProgramming
275+
274,Dirge, https://github.com/IkuzakIkuzok/Dirge,Disposer

v2/RSCGExamplesData/GeneratorDataRec.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,5 +1654,11 @@
16541654
"Category": 10,
16551655
"dtStart": "2026-06-30T00:00:00",
16561656
"show": true
1657+
},
1658+
{
1659+
"ID": "Dirge",
1660+
"Category": 18,
1661+
"dtStart": "2026-07-01T00:00:00",
1662+
"show": true
16571663
}
16581664
]

v2/book/examples/Dirge.html

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
2+
<h1>RSCG nr 274 : Dirge</h1>
3+
4+
<h2>Info</h2>
5+
Nuget : <a href="https://www.nuget.org/packages/Dirge/" target="_blank">https://www.nuget.org/packages/Dirge/</a>
6+
7+
<p>You can find more details at : <a href="https://github.com/IkuzakIkuzok/Dirge" target="_blank"> https://github.com/IkuzakIkuzok/Dirge</a></p>
8+
9+
<p>Author :Kazuki Kohzuki</p>
10+
11+
<p>Source: <a href="https://github.com/IkuzakIkuzok/Dirge" target="_blank">https://github.com/IkuzakIkuzok/Dirge</a> </p>
12+
13+
<h2>About</h2>
14+
15+
**Dirge** is a Roslyn-based code generator that automatically implements the `IDisposable` pattern for C# classes.Key Features:1. **AutoDispose Attribute**: Mark any partial class with `[AutoDispose]` to automatically generate `Dispose()` and `Dispose(bool)` methods.2. **Automatic Field Disposal**: The generator detects all disposable fields and automatically calls `.Dispose()` on them in the correct order.
16+
17+
<h2>
18+
How to use
19+
</h2>
20+
<h3>
21+
Add reference to the <a href="https://www.nuget.org/packages/Dirge/" target="_blank">Dirge</a> in the csproj
22+
</h3>
23+
<img src="images/Dirge/IDisp.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/Dirge/csFiles/Program.cs.png" width="580" height="580" />
31+
<hr />
32+
33+
<br />
34+
I have <b>coded</b> the file DALDB.cs
35+
<br />
36+
<img src="images/Dirge/csFiles/DALDB.cs.png" width="580" height="580" />
37+
<hr />
38+
39+
<br />
40+
I have <b>coded</b> the file ConnectionDB.cs
41+
<br />
42+
<img src="images/Dirge/csFiles/ConnectionDB.cs.png" width="580" height="580" />
43+
<hr />
44+
<h3>And here are the <i>generated</i> files</h3>
45+
46+
<br />
47+
The file <i>generated</i> is DALDB.GeneratedDispose.g.cs
48+
<br />
49+
<img src="images/Dirge/generated/DALDB.GeneratedDispose.g.cs.png" width="580" height="580" />
50+
51+
<br />
52+
The file <i>generated</i> is AutoDisposeAttribute.g.cs
53+
<br />
54+
<img src="images/Dirge/generated/AutoDisposeAttribute.g.cs.png" width="580" height="580" />
55+
56+
<br />
57+
The file <i>generated</i> is DoNotDisposeAttribute.g.cs
58+
<br />
59+
<img src="images/Dirge/generated/DoNotDisposeAttribute.g.cs.png" width="580" height="580" />
60+
61+
<br />
62+
The file <i>generated</i> is DoNotDisposeWhenAttribute.g.cs
63+
<br />
64+
<img src="images/Dirge/generated/DoNotDisposeWhenAttribute.g.cs.png" width="580" height="580" />
65+
66+
<p>
67+
You can download the code and this page as pdf from
68+
<a target="_blank" href='https://ignatandrei.github.io/RSCG_Examples/v2/docs/Dirge'>
69+
https://ignatandrei.github.io/RSCG_Examples/v2/docs/Dirge
70+
</a>
71+
</p>
72+
73+
74+
<p>
75+
You can see the whole list at
76+
<a target="_blank" href='https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG'>
77+
https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG
78+
</a>
79+
</p>
80+

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 273 RSCG with examples =>
20+
This is the list of 274 RSCG with examples =>
2121
</h1>
2222

2323
<table >
@@ -1118,6 +1118,10 @@ <h1>
11181118
<td>273</td>
11191119
<td><a href="examples/ScottEncodingGenerator.html">ScottEncodingGenerator</a></td>
11201120
</tr>
1121+
<tr>
1122+
<td>274</td>
1123+
<td><a href="examples/Dirge.html">Dirge</a></td>
1124+
</tr>
11211125
</table>
11221126

11231127

v2/book/pandocHTML.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ input-files:
287287
- examples/TypedStateBuilder.Generator.html
288288
- examples/AlephMapper.html
289289
- examples/ScottEncodingGenerator.html
290+
- examples/Dirge.html
290291

291292
# or you may use input-file: with a single value
292293
# defaults:

v2/docFind.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1636,5 +1636,11 @@
16361636
"category": "FunctionalProgramming",
16371637
"href": "/RSCG_Examples/v2/docs/ScottEncodingGenerator/",
16381638
"body": "Roslyn incremental source generator for partial interfaces and abstract partial classes that generates Match methods, nested case implementations, and companion module helpers for Scott-encoded types."
1639+
},
1640+
{
1641+
"title": "Dirge",
1642+
"category": "Disposer",
1643+
"href": "/RSCG_Examples/v2/docs/Dirge/",
1644+
"body": "Disposable Implementation Roslyn Generator Extension"
16391645
}
16401646
]
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"generator":{
3+
"name":"Dirge",
4+
"nuget":[
5+
"https://www.nuget.org/packages/Dirge/"
6+
],
7+
"link":"https://github.com/IkuzakIkuzok/Dirge",
8+
"author":"Kazuki Kohzuki",
9+
"source":"https://github.com/IkuzakIkuzok/Dirge"
10+
},
11+
"data":{
12+
"goodFor":["",
13+
"",
14+
"Dirge is a Roslyn-based code generator that automatically implements the `IDisposable` pattern for C# classes.",
15+
"",
16+
"Key Features:",
17+
"",
18+
"1. AutoDispose Attribute: Mark any partial class with `[AutoDispose]` to automatically generate `Dispose()` and `Dispose(bool)` methods.",
19+
"",
20+
"2. Automatic Field Disposal: The generator detects all disposable fields and automatically calls `.Dispose()` on them in the correct order.",
21+
""
22+
],
23+
"csprojDemo":"IDisp.csproj",
24+
"csFiles":["Program.cs","DALDB.cs","ConnectionDB.cs"],
25+
"excludeDirectoryGenerated":[""],
26+
"includeAdditionalFiles":[""]
27+
},
28+
"links":{
29+
"blog":"",
30+
"video":""
31+
}
32+
}

v2/rscg_examples/Dirge/nuget.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Disposable Implementation Roslyn Generator Extension

0 commit comments

Comments
 (0)