Skip to content
Merged

demo #468

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
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# RSCG - 265 Examples of Roslyn Source Code Generators / 16 created by Microsoft /
# RSCG - 266 Examples of Roslyn Source Code Generators / 16 created by Microsoft /

The RSCG_Examples repository is a comprehensive documentation system that automatically processes and showcases 265 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 266 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

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 265 Roslyn Source Code Generators that I have tested you can see and download source code example.
Those are the 266 Roslyn Source Code Generators that I have tested you can see and download source code example.
( including 16 from Microsoft )
### 266. [Aigamo.MatchGenerator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/Aigamo.MatchGenerator) , in the [Enum](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enum) category

Generated on : 2026-04-05 => 05 April 2026
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Verify future generated date against PR creation time.

Line 31 says Generated on : 2026-04-05, but this PR was created on April 4, 2026. Please confirm this is expected (timezone/automation behavior) to avoid timeline confusion in the catalog.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 31, The README contains a generated date string "Generated
on : 2026-04-05" that does not match the PR creation date (Apr 4, 2026); update
the generation process to use the PR creation timestamp (or consistently use
UTC) and timezone-aware formatting so the generated date matches the PR creation
time, then regenerate the README to replace the "Generated on : YYYY-MM-DD" line
with the corrected date; locate the generator that emits the "Generated on :"
line and modify it to pull the PR creation time from the CI/PR metadata or
convert times to a single canonical timezone before formatting.


<details>
<summary>Expand</summary>



Author: Aigamo

Package Description

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


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

Source: [https://github.com/ycanardeau/MatchGenerator](https://github.com/ycanardeau/MatchGenerator)

</details>

### 265. [lomapper](https://ignatandrei.github.io/RSCG_Examples/v2/docs/lomapper) , in the [Mapper](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mapper) category

Generated on : 2026-04-07 => 07 April 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 @@ -264,3 +264,4 @@ Nr,Key,Source,Category
263,TaggedEnum, https://github.com/al0rid4l/SixTatami,Enum
264,Najlot.Audit.SourceGenerator, https://github.com/najlot/Audit,Audit
265,lomapper, https://github.com/jdtoon/lomapper,Mapper
266,Aigamo.MatchGenerator, https://github.com/ycanardeau/MatchGenerator,Enum
6 changes: 6 additions & 0 deletions v2/RSCGExamplesData/GeneratorDataRec.json
Original file line number Diff line number Diff line change
Expand Up @@ -1606,5 +1606,11 @@
"Category": 6,
"dtStart": "2026-04-07T00:00:00",
"show": true
} ,
{
"ID":"Aigamo.MatchGenerator",
"Category": 19,
"dtStart": "2026-04-05T00:00:00",
"show": true
}
Comment on lines +1609 to 1615
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

The entries in this JSON appear to be ordered by dtStart ascending (e.g., 2026-04-04, 2026-04-05, 2026-04-06, 2026-04-07). The newly added Aigamo.MatchGenerator item has dtStart 2026-04-05 but is appended after the 2026-04-07 entry, which breaks that ordering and makes the file harder to maintain (and may affect any code that assumes sorted input). Consider inserting this record next to the other 2026-04-05 entries (e.g., near TaggedEnum) instead of appending at the end.

Copilot uses AI. Check for mistakes.
]
79 changes: 79 additions & 0 deletions v2/book/examples/Aigamo.MatchGenerator.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@

<h1>RSCG nr 266 : Aigamo.MatchGenerator</h1>

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

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

<p>Author :Aigamo</p>

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

<h2>About</h2>

Transform enums into tagged unions -with error in Match !

<h2>
How to use
</h2>
<h3>
Add reference to the <a href="https://www.nuget.org/packages/Aigamo.MatchGenerator/" target="_blank">Aigamo.MatchGenerator</a> in the csproj
</h3>
<img src="images/Aigamo.MatchGenerator/EnumDemo.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/Aigamo.MatchGenerator/csFiles/Program.cs.png" width="580" height="580" />
<hr />

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

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

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

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

<br />
The file <i>generated</i> is EnumDemoEnumDemo.CarTypesTaggedEnum.g.cs
<br />
<img src="images/Aigamo.MatchGenerator/generated/EnumDemoEnumDemo.CarTypesTaggedEnum.g.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is TaggedEnumAttribute.g.cs
<br />
<img src="images/Aigamo.MatchGenerator/generated/TaggedEnumAttribute.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/Aigamo.MatchGenerator'>
https://ignatandrei.github.io/RSCG_Examples/v2/docs/Aigamo.MatchGenerator
</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 265 RSCG with examples =>
This is the list of 266 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.

⚠️ Potential issue | 🟡 Minor

Escape special character in heading text.

Line 20 includes a raw > which triggers HTMLHint (spec-char-escape). Escape it to keep HTML lint-clean.

Suggested fix
-This is the list of 266 RSCG with examples =>
+This is the list of 266 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 266 RSCG with examples =>
This is the list of 266 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 the current code and only fix it if needed.

In `@v2/book/list.html` at line 20, The heading text in v2/book/list.html contains
a raw '>' character ("This is the list of 266 RSCG with examples =>") that
violates HTMLHint spec-char-escape; update that heading (the line containing
that exact string) to escape the greater-than sign (replace '>' with '&gt;') so
the markup is lint-clean while preserving the visible text.

</h1>

<table >
Expand Down Expand Up @@ -1086,6 +1086,10 @@ <h1>
<td>265</td>
<td><a href="examples/lomapper.html">lomapper</a></td>
</tr>
<tr>
<td>266</td>
<td><a href="examples/Aigamo.MatchGenerator.html">Aigamo.MatchGenerator</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 @@ -279,6 +279,7 @@ input-files:
- examples/TaggedEnum.html
- examples/Najlot.Audit.SourceGenerator.html
- examples/lomapper.html
- examples/Aigamo.MatchGenerator.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 @@ -1588,5 +1588,11 @@
"category": "Mapper",
"href": "/RSCG_Examples/v2/docs/lomapper/",
"body": "LoMapper - Lightweight Object Mapper using compile-time source generation. Zero runtime reflection."
},
{
"title": "Aigamo.MatchGenerator",
"category": "Enum",
"href": "/RSCG_Examples/v2/docs/Aigamo.MatchGenerator/",
"body": "Package Description"
}
]
22 changes: 22 additions & 0 deletions v2/rscg_examples/Aigamo.MatchGenerator/description.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"generator":{
"name":"Aigamo.MatchGenerator",
"nuget":[
"https://www.nuget.org/packages/Aigamo.MatchGenerator/"
],
"link":"https://github.com/ycanardeau/MatchGenerator",
"author":"Aigamo",
"source":"https://github.com/ycanardeau/MatchGenerator"
},
"data":{
"goodFor":["Transform enums into tagged unions -with error in Match !"],
"csprojDemo":"EnumDemo.csproj",
"csFiles":["Program.cs","CarTypes.cs"],
"excludeDirectoryGenerated":[""],
"includeAdditionalFiles":[""]
},
"links":{
"blog":"",
"video":""
}
}
1 change: 1 addition & 0 deletions v2/rscg_examples/Aigamo.MatchGenerator/nuget.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Package Description
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

nuget.txt is used as the package description in the generated docs, but it currently contains the placeholder text "Package Description". Consider replacing this with the actual NuGet package description so the example page and search index have meaningful content.

Suggested change
Package Description
Source generator for generating pattern-matching code in .NET applications.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Replace placeholder NuGet text with real package summary.

Line 1 still contains placeholder content (Package Description), which will surface as low-quality docs/metadata for this example.

Suggested fix
-Package Description
+<actual one-line description of Aigamo.MatchGenerator from NuGet/package docs>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@v2/rscg_examples/Aigamo.MatchGenerator/nuget.txt` at line 1, Replace the
placeholder first line "Package Description" in nuget.txt with a concise real
NuGet package summary: a one-line sentence describing what Aigamo.MatchGenerator
does (its primary purpose), the target platform/framework (e.g., .NET version),
and the main capabilities or audience (e.g., match generation for
games/simulations), keeping it factual and under ~120 characters; update the
first line only so package metadata shows a meaningful summary rather than
placeholder text.

Loading
Loading