Skip to content

Commit c8d52df

Browse files
committed
Generator number 17: HttpClient
1 parent 5332ec6 commit c8d52df

5 files changed

Lines changed: 1189 additions & 8 deletions

File tree

docs/index.docx

408 KB
Binary file not shown.

docs/index.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,13 @@
126126
- [Example code](#example-code-15)
127127
- [More details about RSCG
128128
RSCG\_AMS](#more-details-about-rscg-rscg_ams)
129+
- [RSCG number 17 :
130+
HttpClientGenerator](#rscg-number-17--httpclientgenerator)
131+
- [What RSCG HttpClientGenerator can
132+
do](#what-rscg-httpclientgenerator-can-do)
133+
- [Example code](#example-code-16)
134+
- [More details about RSCG
135+
HttpClientGenerator](#more-details-about-rscg-httpclientgenerator)
129136
- [RSCG - worth mention](#rscg---worth-mention)
130137
- [Final Chapter](#final-chapter)
131138
- [Conclusion](#conclusion)
@@ -1293,6 +1300,58 @@ For more usage features please read :
12931300

12941301
[<https://github.com/ignatandrei/RSCG_Examples/tree/main/CI_Version>](https://github.com/ignatandrei/RSCG_Examples/tree/main/CI_Version)
12951302

1303+
## RSCG number 17 : HttpClientGenerator
1304+
1305+
### What RSCG HttpClientGenerator can do
1306+
1307+
HttpClientGenerator is a tool that uses Roslyn code generator feature to
1308+
write boilerplate HttpClient code for you.
1309+
1310+
### Example code
1311+
1312+
#### Here is the csproj with the references for RSCG HttpClientGenerator
1313+
1314+
![csprj](http://ignatandrei.github.io/RSCG_Examples/images/HttpClientGenerator/The.csproj.png)
1315+
<small>
1316+
[code](http://ignatandrei.github.io/RSCG_Examples/images/HttpClientGenerator/The.csproj)
1317+
</small>
1318+
1319+
#### The initial code that you start with is
1320+
1321+
![start](http://ignatandrei.github.io/RSCG_Examples/images/HttpClientGenerator/ExistingCode.cs.png)
1322+
<small>
1323+
[code](http://ignatandrei.github.io/RSCG_Examples/images/HttpClientGenerator/ExistingCode.cs)
1324+
</small>
1325+
1326+
#### The code below will use the RSCG HttpClientGenerator
1327+
1328+
![usage](http://ignatandrei.github.io/RSCG_Examples/images/HttpClientGenerator/Usage.cs.png)
1329+
<small>
1330+
[code](http://ignatandrei.github.io/RSCG_Examples/images/HttpClientGenerator/Usage.cs)
1331+
<small>
1332+
1333+
#### The code that is generated by RSCG HttpClientGenerator
1334+
1335+
![gc](http://ignatandrei.github.io/RSCG_Examples/images/HttpClientGenerator/GeneratedCode.cs.png)
1336+
<small>
1337+
[code](http://ignatandrei.github.io/RSCG_Examples/images/HttpClientGenerator/GeneratedCode.cs)
1338+
</small>
1339+
1340+
### More details about RSCG HttpClientGenerator
1341+
1342+
The author of **RSCG HttpClientGenerator** is *Jalal Amini Robati*
1343+
1344+
You cand find **RSCG HttpClientGenerator** at Nuget.org :
1345+
<https://www.nuget.org/packages/HttpClientGenerator/> and the sources at
1346+
<https://github.com/Jalalx/HttpClientCodeGenerator>
1347+
1348+
For more usage features please read :
1349+
<https://github.com/Jalalx/HttpClientCodeGenerator>
1350+
1351+
#### Link to Example Code:
1352+
1353+
[<https://github.com/ignatandrei/RSCG_Examples/tree/main/HttpClientCodeGenerator>](https://github.com/ignatandrei/RSCG_Examples/tree/main/HttpClientCodeGenerator)
1354+
12961355
## RSCG - worth mention
12971356

12981357
There are more RSCG that you could see - here is a list that you may
@@ -1326,6 +1385,7 @@ want to look at:
13261385
20. <https://github.com/thinktecture/article-roslyn-source-generators>
13271386
21. <https://github.com/HamedFathi/MockableStaticGenerator>
13281387
22. <https://github.com/mrtaikandi/MapTo/>
1388+
23. <https://www.nuget.org/packages/Dnf.SourceGenerators/1.0.0>
13291389

13301390
## Final Chapter
13311391

0 commit comments

Comments
 (0)