Skip to content

Commit 79d1c60

Browse files
authored
Merge pull request #467 from ignatandrei/lomapper
2 parents ee6d933 + e2d2b7d commit 79d1c60

29 files changed

Lines changed: 1700 additions & 24 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 - 264 Examples of Roslyn Source Code Generators / 16 created by Microsoft /
1+
# RSCG - 265 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 264 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 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.
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-04-06 => 06 April 2026
7+
## Latest Update : 2026-04-07 => 07 April 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 264 Roslyn Source Code Generators that I have tested you can see and download source code example.
27+
Those are the 265 Roslyn Source Code Generators that I have tested you can see and download source code example.
2828
( including 16 from Microsoft )
29+
### 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
30+
31+
Generated on : 2026-04-07 => 07 April 2026
32+
33+
<details>
34+
<summary>Expand</summary>
35+
36+
37+
38+
Author: Junaid Desai
39+
40+
LoMapper - Lightweight Object Mapper using compile-time source generation. Zero runtime reflection.
41+
42+
Nuget: [https://www.nuget.org/packages/lomapper/](https://www.nuget.org/packages/lomapper/)
43+
44+
45+
Link: [https://ignatandrei.github.io/RSCG_Examples/v2/docs/lomapper](https://ignatandrei.github.io/RSCG_Examples/v2/docs/lomapper)
46+
47+
Source: [https://github.com/jdtoon/lomapper](https://github.com/jdtoon/lomapper)
48+
49+
</details>
50+
2951
### 264. [Najlot.Audit.SourceGenerator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/Najlot.Audit.SourceGenerator) , in the [Audit](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#audit) category
3052

3153
Generated on : 2026-04-06 => 06 April 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-04-06 => 06 April 2026
3+
## Latest Update : 2026-04-07 => 07 April 2026
44

55

66

v2/.tours/lomapper.tour

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
2+
{
3+
"$schema": "https://aka.ms/codetour-schema",
4+
"title": "lomapper",
5+
"steps":
6+
[
7+
{
8+
"file": "rscg_examples/loMapper/src/mapperDemo/mapperDemo.csproj",
9+
"description": "First, we add Nuget [lomapper](https://www.nuget.org/packages/lomapper/) in csproj ",
10+
"pattern": "lomapper"
11+
}
12+
13+
,{
14+
"file": "rscg_examples/loMapper/src/mapperDemo/PersonDTO.cs",
15+
"description": "File PersonDTO.cs ",
16+
"pattern": "this is the code"
17+
}
18+
19+
,{
20+
"file": "rscg_examples/loMapper/src/mapperDemo/Person.cs",
21+
"description": "File Person.cs ",
22+
"pattern": "this is the code"
23+
}
24+
25+
,{
26+
"file": "rscg_examples/loMapper/src/mapperDemo/Program.cs",
27+
"description": "File Program.cs \r\n>> dotnet run --project rscg_examples/loMapper/src/mapperDemo/mapperDemo.csproj ",
28+
"pattern": "this is the code"
29+
}
30+
31+
32+
,{
33+
"file": "rscg_examples/loMapper/src/mapperDemo/obj/GX/LoMapper.Generator/LoMapper.Generator.LoMapperGenerator/UserMapper.g.cs",
34+
"description": "Generated File 6 from 6 : UserMapper.g.cs ",
35+
"line": 1
36+
}
37+
38+
,{
39+
"file": "rscg_examples/loMapper/src/mapperDemo/obj/GX/LightweightObjectMapper/LightweightObjectMapper.LightweightObjectMapperSourceGenerator/PredefinedSpecialTypeMapping.Generated.cs",
40+
"description": "Generated File 5 from 6 : PredefinedSpecialTypeMapping.Generated.cs ",
41+
"line": 1
42+
}
43+
44+
,{
45+
"file": "rscg_examples/loMapper/src/mapperDemo/obj/GX/LightweightObjectMapper/LightweightObjectMapper.LightweightObjectMapperSourceGenerator/LOMMapExtensions_mapperDemo_Person.g.cs",
46+
"description": "Generated File 4 from 6 : LOMMapExtensions_mapperDemo_Person.g.cs ",
47+
"line": 1
48+
}
49+
50+
,{
51+
"file": "rscg_examples/loMapper/src/mapperDemo/obj/GX/LightweightObjectMapper/LightweightObjectMapper.LightweightObjectMapperSourceGenerator/LightweightObjectMapper.PreCodes.PredefinedSpecialTypeMapping.cs",
52+
"description": "Generated File 3 from 6 : LightweightObjectMapper.PreCodes.PredefinedSpecialTypeMapping.cs ",
53+
"line": 1
54+
}
55+
56+
,{
57+
"file": "rscg_examples/loMapper/src/mapperDemo/obj/GX/LightweightObjectMapper/LightweightObjectMapper.LightweightObjectMapperSourceGenerator/LightweightObjectMapper.PreCodes.LightweightObjectMapperPreCodes.cs",
58+
"description": "Generated File 2 from 6 : LightweightObjectMapper.PreCodes.LightweightObjectMapperPreCodes.cs ",
59+
"line": 1
60+
}
61+
62+
,{
63+
"file": "rscg_examples/loMapper/src/mapperDemo/obj/GX/LightweightObjectMapper/LightweightObjectMapper.LightweightObjectMapperSourceGenerator/Extensions.Generated.cs",
64+
"description": "Generated File 1 from 6 : Extensions.Generated.cs ",
65+
"line": 1
66+
}
67+
68+
],
69+
70+
"ref": "main"
71+
72+
}

v2/Generator/MultiGeneratorV2.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public string[] SourceNoRSCG()
119119
{
120120
var text=await File.ReadAllTextAsync(nameFile);
121121
text = text.Replace("(/.github/", $"({d.Generator!.Source}/.github/");
122-
122+
text = text.Replace("(BenchmarkDotNet", $"({d.Generator!.Source}/BenchmarkDotNet");
123123
text = text.Replace("(./BoolParameterGenerator.Github.Example/", $"({d.Generator!.Source}/BoolParameterGenerator.Github.Example/");
124124
text = text.Replace("(docs/", $"({d.Generator!.Source}/docs/");
125125
text = text.Replace("(img/", $"({d.Generator!.Source}/img/");

v2/Generator/all.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,3 +263,4 @@ Nr,Key,Source,Category
263263
262,SvgIconGenerator, https://github.com/helluvamatt/SvgIconGenerator,FilesToCode
264264
263,TaggedEnum, https://github.com/al0rid4l/SixTatami,Enum
265265
264,Najlot.Audit.SourceGenerator, https://github.com/najlot/Audit,Audit
266+
265,loMapper, https://github.com/jdtoon/lomapper,Mapper

v2/RSCGExamplesData/GeneratorDataRec.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1600,5 +1600,11 @@
16001600
"Category": 47,
16011601
"dtStart": "2026-04-06T00:00:00",
16021602
"show": true
1603-
}
1603+
},
1604+
{
1605+
"ID":"lomapper",
1606+
"Category": 6,
1607+
"dtStart": "2026-04-07T00:00:00",
1608+
"show": true
1609+
}
16041610
]

v2/book/examples/lomapper.html

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
2+
<h1>RSCG nr 265 : lomapper</h1>
3+
4+
<h2>Info</h2>
5+
Nuget : <a href="https://www.nuget.org/packages/lomapper/" target="_blank">https://www.nuget.org/packages/lomapper/</a>
6+
7+
<p>You can find more details at : <a href="https://github.com/jdtoon/lomapper" target="_blank"> https://github.com/jdtoon/lomapper</a></p>
8+
9+
<p>Author :Junaid Desai</p>
10+
11+
<p>Source: <a href="https://github.com/jdtoon/lomapper" target="_blank">https://github.com/jdtoon/lomapper</a> </p>
12+
13+
<h2>About</h2>
14+
15+
Generate mapping code at compile time using source generators.
16+
17+
<h2>
18+
How to use
19+
</h2>
20+
<h3>
21+
Add reference to the <a href="https://www.nuget.org/packages/lomapper/" target="_blank">lomapper</a> in the csproj
22+
</h3>
23+
<img src="images/lomapper/mapperDemo.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/lomapper/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/lomapper/csFiles/Person.cs.png" width="580" height="580" />
37+
<hr />
38+
39+
<br />
40+
I have <b>coded</b> the file PersonDto.cs
41+
<br />
42+
<img src="images/lomapper/csFiles/PersonDto.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 Extensions.Generated.cs
48+
<br />
49+
<img src="images/lomapper/generated/Extensions.Generated.cs.png" width="580" height="580" />
50+
51+
<br />
52+
The file <i>generated</i> is LightweightObjectMapper.PreCodes.LightweightObjectMapperPreCodes.cs
53+
<br />
54+
<img src="images/lomapper/generated/LightweightObjectMapper.PreCodes.LightweightObjectMapperPreCodes.cs.png" width="580" height="580" />
55+
56+
<br />
57+
The file <i>generated</i> is LightweightObjectMapper.PreCodes.PredefinedSpecialTypeMapping.cs
58+
<br />
59+
<img src="images/lomapper/generated/LightweightObjectMapper.PreCodes.PredefinedSpecialTypeMapping.cs.png" width="580" height="580" />
60+
61+
<br />
62+
The file <i>generated</i> is LOMMapExtensions_mapperDemo_Person.g.cs
63+
<br />
64+
<img src="images/lomapper/generated/LOMMapExtensions_mapperDemo_Person.g.cs.png" width="580" height="580" />
65+
66+
<br />
67+
The file <i>generated</i> is PredefinedSpecialTypeMapping.Generated.cs
68+
<br />
69+
<img src="images/lomapper/generated/PredefinedSpecialTypeMapping.Generated.cs.png" width="580" height="580" />
70+
71+
<br />
72+
The file <i>generated</i> is UserMapper.g.cs
73+
<br />
74+
<img src="images/lomapper/generated/UserMapper.g.cs.png" width="580" height="580" />
75+
76+
<p>
77+
You can download the code and this page as pdf from
78+
<a target="_blank" href='https://ignatandrei.github.io/RSCG_Examples/v2/docs/lomapper'>
79+
https://ignatandrei.github.io/RSCG_Examples/v2/docs/lomapper
80+
</a>
81+
</p>
82+
83+
84+
<p>
85+
You can see the whole list at
86+
<a target="_blank" href='https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG'>
87+
https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG
88+
</a>
89+
</p>
90+

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

2323
<table >
@@ -1082,6 +1082,10 @@ <h1>
10821082
<td>264</td>
10831083
<td><a href="examples/Najlot.Audit.SourceGenerator.html">Najlot.Audit.SourceGenerator</a></td>
10841084
</tr>
1085+
<tr>
1086+
<td>265</td>
1087+
<td><a href="examples/lomapper.html">lomapper</a></td>
1088+
</tr>
10851089
</table>
10861090

10871091

v2/book/pandocHTML.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ input-files:
278278
- examples/SvgIconGenerator.html
279279
- examples/TaggedEnum.html
280280
- examples/Najlot.Audit.SourceGenerator.html
281+
- examples/lomapper.html
281282

282283
# or you may use input-file: with a single value
283284
# defaults:
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"generator":{
3+
"name":"lomapper",
4+
"nuget":[
5+
"https://www.nuget.org/packages/lomapper/"
6+
],
7+
"link":"https://github.com/jdtoon/lomapper",
8+
"author":"Junaid Desai",
9+
"source":"https://github.com/jdtoon/lomapper"
10+
},
11+
"data":{
12+
"goodFor":["Generate mapping code at compile time using source generators."],
13+
"csprojDemo":"mapperDemo.csproj",
14+
"csFiles":["Program.cs","Person.cs","PersonDTO.cs"],
15+
"excludeDirectoryGenerated":[""],
16+
"includeAdditionalFiles":[""]
17+
},
18+
"links":{
19+
"blog":"",
20+
"video":""
21+
}
22+
}

0 commit comments

Comments
 (0)