Skip to content

Commit 3e0f7e1

Browse files
authored
Merge pull request #381 from ignatandrei/Flaggen
This PR adds a new Roslyn Source Code Generator (RSCG) example for "Flaggen" to the documentation site, updating the total count from 204 to 205 examples. Flaggen is a C# source generator that creates extension methods for flag enums to perform bitwise operations. Key changes: Added Flaggen as the 205th RSCG example in the Enum category Updated all count references from 204 to 205 throughout the documentation Added complete documentation and example code for the Flaggen generator
2 parents a87ac5f + 9c708b8 commit 3e0f7e1

File tree

26 files changed

+621
-17
lines changed

26 files changed

+621
-17
lines changed

README.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# RSCG - 204 Examples of Roslyn Source Code Generators / 14 created by Microsoft /
1+
# RSCG - 205 Examples of Roslyn Source Code Generators / 14 created by Microsoft /
22

3-
## Latest Update : 2025-07-22 => 22 July 2025
3+
## Latest Update : 2025-07-23 => 23 July 2025
44

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

@@ -20,8 +20,30 @@ If you want to be notified each time I add a new RSCG example , please click htt
2020

2121
## Content
2222

23-
Those are the 204 Roslyn Source Code Generators that I have tested you can see and download source code example.
23+
Those are the 205 Roslyn Source Code Generators that I have tested you can see and download source code example.
2424
( including 14 from Microsoft )
25+
### 205. [Flaggen](https://ignatandrei.github.io/RSCG_Examples/v2/docs/Flaggen) , in the [Enum](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enum) category
26+
27+
Generated on : 2025-07-23 => 23 July 2025
28+
29+
<details>
30+
<summary>Expand</summary>
31+
32+
33+
34+
Author: Ricardo Boss
35+
36+
Package Description
37+
38+
Nuget: [https://www.nuget.org/packages/Flaggen/](https://www.nuget.org/packages/Flaggen/)
39+
40+
41+
Link: [https://ignatandrei.github.io/RSCG_Examples/v2/docs/Flaggen](https://ignatandrei.github.io/RSCG_Examples/v2/docs/Flaggen)
42+
43+
Source: [https://github.com/ricardoboss/Flaggen](https://github.com/ricardoboss/Flaggen)
44+
45+
</details>
46+
2547
### 204. [InlineComposition](https://ignatandrei.github.io/RSCG_Examples/v2/docs/InlineComposition) , in the [Templating](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#templating) category
2648

2749
Generated on : 2025-07-22 => 22 July 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-07-22 => 22 July 2025
3+
## Latest Update : 2025-07-23 => 23 July 2025
44

55

66

v2/Generator/MultiGeneratorV2.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ public string[] SourceNoRSCG()
152152
text = text.Replace("(./CONTRIBUTING.md)", $"({d.Generator!.Source}/CONTRIBUTING.md)");
153153
text = text.Replace("(./LICENSE)", $"({d.Generator!.Source}/LICENSE)");
154154
text = text.Replace("(LICENSE)", $"({d.Generator!.Source}/LICENSE)");
155+
text = text.Replace("(LICENSE.md)", $"({d.Generator!.Source}/LICENSE.md)");
155156
text = text.Replace("(docs/README.md)", $"({d.Generator!.Source}/docs/README.md)");
156157

157158
text = text.Replace("href=\"README.md\"", $"href=\"{d.Generator!.Source}/README.md\"");

v2/Generator/all.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,3 +203,4 @@ Nr,Key,Source,Category
203203
202,Jos.Enumeration, https://github.com/joseftw/jos.enumeration,Enum
204204
203,Tortuga.Shipwright, https://github.com/TortugaResearch/Tortuga.Shipwright,Templating
205205
204,InlineComposition, https://github.com/BlackWhiteYoshi/InlineComposition,Templating
206+
205,Flaggen, https://github.com/ricardoboss/Flaggen,Enum

v2/RSCGExamplesData/GeneratorDataRec.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,5 +1232,11 @@
12321232
"Category": 12,
12331233
"dtStart": "2025-07-22T00:00:00",
12341234
"show": true
1235+
},
1236+
{
1237+
"ID":"Flaggen",
1238+
"Category": 19,
1239+
"dtStart": "2025-07-23T00:00:00",
1240+
"show": true
12351241
}
12361242
]

v2/book/examples/Flaggen.html

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
2+
<h1>RSCG nr 205 : Flaggen</h1>
3+
4+
<h2>Info</h2>
5+
Nuget : <a href="https://www.nuget.org/packages/Flaggen/" target="_blank">https://www.nuget.org/packages/Flaggen/</a>
6+
7+
<p>You can find more details at : <a href="https://github.com/ricardoboss/Flaggen" target="_blank"> https://github.com/ricardoboss/Flaggen</a></p>
8+
9+
<p>Author :Ricardo Boss</p>
10+
11+
<p>Source: <a href="https://github.com/ricardoboss/Flaggen" target="_blank">https://github.com/ricardoboss/Flaggen</a> </p>
12+
13+
<h2>About</h2>
14+
15+
Explicit operations about flags with enums, and bitwise operations
16+
17+
<h2>
18+
How to use
19+
</h2>
20+
<h3>
21+
Add reference to the <a href="https://www.nuget.org/packages/Flaggen/" target="_blank">Flaggen</a> in the csproj
22+
</h3>
23+
<img src="images/Flaggen/EnumDemo.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/Flaggen/csFiles/Program.cs.png" width="580" height="580" />
31+
<hr />
32+
33+
<br />
34+
I have <b>coded</b> the file Colors.cs
35+
<br />
36+
<img src="images/Flaggen/csFiles/Colors.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 Colors_FlaggenExtensions.g.cs
42+
<br />
43+
<img src="images/Flaggen/generated/Colors_FlaggenExtensions.g.cs.png" width="580" height="580" />
44+
45+
<p>
46+
You can download the code and this page as pdf from
47+
<a target="_blank" href='https://ignatandrei.github.io/RSCG_Examples/v2/docs/Flaggen'>
48+
https://ignatandrei.github.io/RSCG_Examples/v2/docs/Flaggen
49+
</a>
50+
</p>
51+
52+
53+
<p>
54+
You can see the whole list at
55+
<a target="_blank" href='https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG'>
56+
https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG
57+
</a>
58+
</p>
59+

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

2323
<table >
@@ -842,6 +842,10 @@ <h1>
842842
<td>204</td>
843843
<td><a href="examples/InlineComposition.html">InlineComposition</a></td>
844844
</tr>
845+
<tr>
846+
<td>205</td>
847+
<td><a href="examples/Flaggen.html">Flaggen</a></td>
848+
</tr>
845849
</table>
846850

847851

v2/book/pandocHTML.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ input-files:
218218
- examples/jos.enumeration.html
219219
- examples/Tortuga.Shipwright.html
220220
- examples/InlineComposition.html
221+
- examples/Flaggen.html
221222

222223
# or you may use input-file: with a single value
223224
# defaults:
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"generator":{
3+
"name":"Flaggen",
4+
"nuget":[
5+
"https://www.nuget.org/packages/Flaggen/"
6+
],
7+
"link":"https://github.com/ricardoboss/Flaggen",
8+
"author":"Ricardo Boss",
9+
"source":"https://github.com/ricardoboss/Flaggen"
10+
},
11+
"data":{
12+
"goodFor":["Explicit operations about flags with enums, and bitwise operations"],
13+
"csprojDemo":"EnumDemo.csproj",
14+
"csFiles":["Program.cs","Colors.cs"],
15+
"excludeDirectoryGenerated":[""],
16+
"includeAdditionalFiles":[""]
17+
},
18+
"links":{
19+
"blog":"",
20+
"video":""
21+
}
22+
}

v2/rscg_examples/Flaggen/nuget.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Package Description

0 commit comments

Comments
 (0)