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
30 changes: 26 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# RSCG - 273 Examples of Roslyn Source Code Generators / 16 created by Microsoft /
# RSCG - 274 Examples of Roslyn Source Code Generators / 16 created by Microsoft /

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.
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.

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

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

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 273 Roslyn Source Code Generators that I have tested you can see and download source code example.
Those are the 274 Roslyn Source Code Generators that I have tested you can see and download source code example.
( including 16 from Microsoft )
### 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

Generated on : 2026-07-01 => 01 July 2026

<details>
<summary>Expand</summary>



Author: Kazuki Kohzuki

Disposable Implementation Roslyn Generator Extension

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


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

Source: [https://github.com/IkuzakIkuzok/Dirge](https://github.com/IkuzakIkuzok/Dirge)

</details>

### 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

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



Expand Down
1 change: 1 addition & 0 deletions v2/Generator/all.csv
Original file line number Diff line number Diff line change
Expand Up @@ -272,3 +272,4 @@ Nr,Key,Source,Category
271,TypedStateBuilder.Generator, https://github.com/Georgiy-Petrov/TypedStateBuilder.Generator,Builder
272,AlephMapper, https://github.com/Raffinert/AlephMapper,Database
273,ScottEncodingGenerator, https://github.com/Georgiy-Petrov/ScottEncodingGenerator,FunctionalProgramming
274,Dirge, https://github.com/IkuzakIkuzok/Dirge,Disposer
6 changes: 6 additions & 0 deletions v2/RSCGExamplesData/GeneratorDataRec.json
Original file line number Diff line number Diff line change
Expand Up @@ -1654,5 +1654,11 @@
"Category": 10,
"dtStart": "2026-06-30T00:00:00",
"show": true
},
{
"ID": "Dirge",
"Category": 18,
"dtStart": "2026-07-01T00:00:00",
"show": true
}
]
80 changes: 80 additions & 0 deletions v2/book/examples/Dirge.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@

<h1>RSCG nr 274 : Dirge</h1>

<h2>Info</h2>
Nuget : <a href="https://www.nuget.org/packages/Dirge/" target="_blank">https://www.nuget.org/packages/Dirge/</a>

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

<p>Author :Kazuki Kohzuki</p>

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

<h2>About</h2>

**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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Render the About block as HTML.

Line 15 is still markdown text, so the browser will show literal ** and a run-on sentence instead of formatted content. Convert it before writing this page.

Suggested shape
-**Dirge** is ...
+<p><strong>Dirge</strong> is ...</p>
+<ol>
+  <li>...</li>
+  <li>...</li>
+</ol>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
**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.
<p><strong>Dirge</strong> is a Roslyn-based code generator that automatically implements the IDisposable pattern for C# classes.</p>
<p>Key Features:</p>
<ol>
<li><strong>AutoDispose Attribute</strong>: Mark any partial class with [AutoDispose] to automatically generate Dispose() and Dispose(bool) methods.</li>
<li><strong>Automatic Field Disposal</strong>: The generator detects all disposable fields and automatically calls .Dispose() on them in the correct order.</li>
</ol>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@v2/book/examples/Dirge.html` at line 15, The About block in Dirge.html is
still being written as markdown text instead of HTML, so replace the raw
markdown in the page content with proper HTML markup before rendering it. Update
the section that outputs the Dirge description so it uses semantic HTML elements
(for example, a heading/paragraph/list structure) rather than literal `**` and
inline markdown, ensuring the browser renders formatted content correctly.


<h2>
How to use
</h2>
<h3>
Add reference to the <a href="https://www.nuget.org/packages/Dirge/" target="_blank">Dirge</a> in the csproj
</h3>
<img src="images/Dirge/IDisp.csproj.png" width="580" height="580" />

<h3>This was for me the <b>starting</b> code</h3>

<br />
I have <b>coded</b> the file Program.cs
<br />
<img src="images/Dirge/csFiles/Program.cs.png" width="580" height="580" />
<hr />

<br />
I have <b>coded</b> the file DALDB.cs
<br />
<img src="images/Dirge/csFiles/DALDB.cs.png" width="580" height="580" />
<hr />

<br />
I have <b>coded</b> the file ConnectionDB.cs
<br />
<img src="images/Dirge/csFiles/ConnectionDB.cs.png" width="580" height="580" />
<hr />
<h3>And here are the <i>generated</i> files</h3>

<br />
The file <i>generated</i> is DALDB.GeneratedDispose.g.cs
<br />
<img src="images/Dirge/generated/DALDB.GeneratedDispose.g.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is AutoDisposeAttribute.g.cs
<br />
<img src="images/Dirge/generated/AutoDisposeAttribute.g.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is DoNotDisposeAttribute.g.cs
<br />
<img src="images/Dirge/generated/DoNotDisposeAttribute.g.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is DoNotDisposeWhenAttribute.g.cs
<br />
<img src="images/Dirge/generated/DoNotDisposeWhenAttribute.g.cs.png" width="580" height="580" />

<p>
You can download the code and this page as pdf from
<a target="_blank" href='https://ignatandrei.github.io/RSCG_Examples/v2/docs/Dirge'>
https://ignatandrei.github.io/RSCG_Examples/v2/docs/Dirge
</a>
</p>


<p>
You can see the whole list at
<a target="_blank" href='https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG'>
https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG
</a>
</p>

6 changes: 5 additions & 1 deletion v2/book/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</head>
<body>
<h1>
This is the list of 273 RSCG with examples =>
This is the list of 274 RSCG with examples =>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Escape the > in the heading text.

Line 20 still contains a raw > and HTMLHint flags it. Replace it with &gt; (or another escaped arrow) so the page stays lint-clean.

Suggested fix
-This is the list of 274 RSCG with examples =>
+This is the list of 274 RSCG with examples =&gt;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
This is the list of 274 RSCG with examples =>
This is the list of 274 RSCG with examples =&gt;
🧰 Tools
🪛 HTMLHint (1.9.2)

[error] 20-20: Special characters must be escaped : [ > ].

(spec-char-escape)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@v2/book/list.html` at line 20, The heading text in the list page still
contains a raw greater-than symbol, which triggers HTMLHint. Update the affected
heading content in the list template so the symbol is escaped (for example using
&gt;), and keep the change localized to the list heading text so the page
remains lint-clean.

Source: Linters/SAST tools

</h1>

<table >
Expand Down Expand Up @@ -1118,6 +1118,10 @@ <h1>
<td>273</td>
<td><a href="examples/ScottEncodingGenerator.html">ScottEncodingGenerator</a></td>
</tr>
<tr>
<td>274</td>
<td><a href="examples/Dirge.html">Dirge</a></td>
</tr>
</table>


Expand Down
1 change: 1 addition & 0 deletions v2/book/pandocHTML.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ input-files:
- examples/TypedStateBuilder.Generator.html
- examples/AlephMapper.html
- examples/ScottEncodingGenerator.html
- examples/Dirge.html

# or you may use input-file: with a single value
# defaults:
Expand Down
6 changes: 6 additions & 0 deletions v2/docFind.json
Original file line number Diff line number Diff line change
Expand Up @@ -1636,5 +1636,11 @@
"category": "FunctionalProgramming",
"href": "/RSCG_Examples/v2/docs/ScottEncodingGenerator/",
"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."
},
{
"title": "Dirge",
"category": "Disposer",
"href": "/RSCG_Examples/v2/docs/Dirge/",
"body": "Disposable Implementation Roslyn Generator Extension"
}
]
32 changes: 32 additions & 0 deletions v2/rscg_examples/Dirge/description.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"generator":{
"name":"Dirge",
"nuget":[
"https://www.nuget.org/packages/Dirge/"
],
"link":"https://github.com/IkuzakIkuzok/Dirge",
"author":"Kazuki Kohzuki",
"source":"https://github.com/IkuzakIkuzok/Dirge"
},
"data":{
"goodFor":["",
"",
"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.",
""
],
"csprojDemo":"IDisp.csproj",
"csFiles":["Program.cs","DALDB.cs","ConnectionDB.cs"],
"excludeDirectoryGenerated":[""],
"includeAdditionalFiles":[""]
},
"links":{
"blog":"",
"video":""
}
}
1 change: 1 addition & 0 deletions v2/rscg_examples/Dirge/nuget.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Disposable Implementation Roslyn Generator Extension
Loading
Loading