Skip to content

Commit 69ba348

Browse files
authored
Merge pull request #361 from ignatandrei/PMart.Enumeration
pmart
2 parents 69c1678 + 7f076dc commit 69ba348

31 files changed

Lines changed: 2912 additions & 210 deletions

README.md

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

3-
## Latest Update : 2025-03-24 => 24 March 2025
3+
## Latest Update : 2025-03-25 => 25 March 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 189 Roslyn Source Code Generators that I have tested you can see and download source code example.
23+
Those are the 190 Roslyn Source Code Generators that I have tested you can see and download source code example.
2424
( including 14 from Microsoft )
25+
### 190. [PMart.Enumeration](https://ignatandrei.github.io/RSCG_Examples/v2/docs/PMart.Enumeration) , in the [Enum](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enum) category
26+
27+
Generated on : 2025-03-25 => 25 March 2025
28+
29+
<details>
30+
<summary>Expand</summary>
31+
32+
33+
34+
Author: Martinho
35+
36+
Source code generator to easly create Enumeration classes.
37+
38+
Nuget: [https://www.nuget.org/packages/PMart.Enumeration.Generator/](https://www.nuget.org/packages/PMart.Enumeration.Generator/)
39+
40+
41+
Link: [https://ignatandrei.github.io/RSCG_Examples/v2/docs/PMart.Enumeration](https://ignatandrei.github.io/RSCG_Examples/v2/docs/PMart.Enumeration)
42+
43+
Source: [https://github.com/p-martinho/Enumeration](https://github.com/p-martinho/Enumeration)
44+
45+
</details>
46+
2547
### 189. [MemberAccessor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/MemberAccessor) , in the [EnhancementClass](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementclass) category
2648

2749
Generated on : 2025-03-24 => 24 March 2025

later.md

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

3-
## Latest Update : 2025-03-24 => 24 March 2025
3+
## Latest Update : 2025-03-25 => 25 March 2025
44

55

66

77
## This are to be done later
88

9-
<details>
10-
<summary>Expand</summary>
119

1210

1311
1) [ArgumentParsing]( https://github.com/DoctorKrolic/ArgumentParsing) , https://github.com/DoctorKrolic/ArgumentParsing
@@ -154,5 +152,4 @@ Why I have not tested : later
154152

155153

156154

157-
</details>
158155

v2/Generator/MultiGeneratorV2.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ public string[] SourceNoRSCG()
119119
{
120120
var text=await File.ReadAllTextAsync(nameFile);
121121
text = text.Replace("(integ-tests/", $"({d.Generator!.Source}/integ-tests/");
122+
text = text.Replace("(./samples", $"({d.Generator!.Source}/samples");
122123

123124
text = text.Replace("(Documentation/", $"({d.Generator!.Source}/Documentation/");
124125
text = text.Replace("(src/", $"({d.Generator!.Source}/src/");

v2/Generator/all.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,4 @@ Nr,Key,Source,Category
188188
187,EntityLengths.Generator, https://github.com/TarasKovalenko/EntityLengths.Generator/,Database
189189
188,StepwiseBuilderGenerator, https://github.com/Georgiy-Petrov/StepwiseBuilderGenerator,Builder
190190
189,MemberAccessor, https://github.com/usausa/member-accessor-generator,EnhancementClass
191+
190,PMart.Enumeration, https://github.com/p-martinho/Enumeration,Enum

v2/RSCGExamplesData/GeneratorDataRec.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,5 +1141,11 @@
11411141
"Category": 5,
11421142
"dtStart": "2025-03-24T00:00:00",
11431143
"show": true
1144+
},
1145+
{
1146+
"ID":"PMart.Enumeration",
1147+
"Category": 19,
1148+
"dtStart": "2025-03-25T00:00:00",
1149+
"show": true
11441150
}
11451151
]
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
2+
<h1>RSCG nr 190 : PMart.Enumeration</h1>
3+
4+
<h2>Info</h2>
5+
Nuget : <a href="https://www.nuget.org/packages/PMart.Enumeration.Generator/" target="_blank">https://www.nuget.org/packages/PMart.Enumeration.Generator/</a>
6+
7+
<p>You can find more details at : <a href="https://github.com/p-martinho/Enumeration" target="_blank"> https://github.com/p-martinho/Enumeration</a></p>
8+
9+
<p>Author :Martinho</p>
10+
11+
<p>Source : <a href="https://github.com/p-martinho/Enumeration" target="_blank">https://github.com/p-martinho/Enumeration</a> </p>
12+
13+
<h2>About</h2>
14+
15+
Constants as enumeration. With EFCore, Swagger and other implementations.
16+
17+
<h2>
18+
How to use
19+
</h2>
20+
<h3>
21+
Add reference to the <a href="https://www.nuget.org/packages/PMart.Enumeration.Generator/" target="_blank">PMart.Enumeration</a> in the csproj
22+
</h3>
23+
<img src="images/PMart.Enumeration/DemoPMart.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/PMart.Enumeration/csFiles/Program.cs.png" width="580" height="580" />
31+
<hr />
32+
33+
<br />
34+
I have <b>coded</b> the file Person.cs
35+
<br />
36+
<img src="images/PMart.Enumeration/csFiles/Person.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 PersonType.g.cs
42+
<br />
43+
<img src="images/PMart.Enumeration/generated/PersonType.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/PMart.Enumeration'>
48+
https://ignatandrei.github.io/RSCG_Examples/v2/docs/PMart.Enumeration
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 189 RSCG with examples =>
20+
This is the list of 190 RSCG with examples =>
2121
</h1>
2222

2323
<table >
@@ -782,6 +782,10 @@ <h1>
782782
<td>189</td>
783783
<td><a href="examples/MemberAccessor.html">MemberAccessor</a></td>
784784
</tr>
785+
<tr>
786+
<td>190</td>
787+
<td><a href="examples/PMart.Enumeration.html">PMart.Enumeration</a></td>
788+
</tr>
785789
</table>
786790

787791

v2/book/pandocHTML.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ input-files:
203203
- examples/EntityLengths.Generator.html
204204
- examples/StepwiseBuilderGenerator.html
205205
- examples/MemberAccessor.html
206+
- examples/PMart.Enumeration.html
206207

207208
# or you may use input-file: with a single value
208209
# defaults:
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"generator":{
3+
"name":"PMart.Enumeration",
4+
"nuget":[
5+
"https://www.nuget.org/packages/PMart.Enumeration.Generator/",
6+
"https://www.nuget.org/packages/PMart.Enumeration/"
7+
8+
],
9+
"link":"https://github.com/p-martinho/Enumeration",
10+
"author":"Martinho",
11+
"source":"https://github.com/p-martinho/Enumeration"
12+
},
13+
"data":{
14+
"goodFor":["Constants as enumeration. With EFCore, Swagger and other implementations."],
15+
"csprojDemo":"DemoPMart.csproj",
16+
"csFiles":["Program.cs","Person.cs"],
17+
"excludeDirectoryGenerated":[""],
18+
"includeAdditionalFiles":[""]
19+
},
20+
"links":{
21+
"blog":"",
22+
"video":""
23+
}
24+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Source code generator to easly create Enumeration classes.

0 commit comments

Comments
 (0)