Skip to content
Merged
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
30 changes: 26 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# RSCG - 218 Examples of Roslyn Source Code Generators / 14 created by Microsoft /
# RSCG - 219 Examples of Roslyn Source Code Generators / 14 created by Microsoft /

## Latest Update : 2025-08-06 => 06 August 2025
## Latest Update : 2025-08-07 => 07 August 2025

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

If you want just those from Microsoft, please click ***[Microsoft](https://ignatandrei.github.io/RSCG_Examples/v2/docs/category/microsoft-examples)***

If you want to see by category, please click ***[category](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples)***
or click any category below
[actor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#actor) -[aop](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#aop) -[api](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#api) -[async](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#async) -[bitwise](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#bitwise) -[blazor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#blazor) -[builder](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#builder) -[clone](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#clone) -[codetostring](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#codetostring) -[commandline](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#commandline) -[console](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#console) -[constructor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#constructor) -[database](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#database) -[dependencyinjection](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#dependencyinjection) -[disposer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#disposer) -[enhancementclass](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementclass) -[enhancementproject](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementproject) -[enum](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enum) -[equals](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#equals) -[filestocode](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#filestocode) -[functionalprogramming](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#functionalprogramming) -[hangfire](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#hangfire) -[interface](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#interface) -[linq](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#linq) -[mapper](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mapper) -[mediator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mediator) -[mvc](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mvc) -[mvvm](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mvvm) -[optimizer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#optimizer) -[primitiveobsession](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#primitiveobsession) -[serializer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#serializer) -[signalr](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#signalr) -[statemachine](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#statemachine) -[templating](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#templating) -[tests](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#tests) -[winapi](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#winapi) -
[actor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#actor) -[ai](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#ai) -[aop](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#aop) -[api](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#api) -[async](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#async) -[bitwise](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#bitwise) -[blazor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#blazor) -[builder](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#builder) -[clone](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#clone) -[codetostring](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#codetostring) -[commandline](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#commandline) -[console](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#console) -[constructor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#constructor) -[database](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#database) -[dependencyinjection](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#dependencyinjection) -[disposer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#disposer) -[enhancementclass](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementclass) -[enhancementproject](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementproject) -[enum](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enum) -[equals](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#equals) -[filestocode](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#filestocode) -[functionalprogramming](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#functionalprogramming) -[hangfire](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#hangfire) -[interface](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#interface) -[linq](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#linq) -[mapper](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mapper) -[mediator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mediator) -[mvc](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mvc) -[mvvm](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mvvm) -[optimizer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#optimizer) -[primitiveobsession](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#primitiveobsession) -[serializer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#serializer) -[signalr](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#signalr) -[statemachine](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#statemachine) -[templating](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#templating) -[tests](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#tests) -[winapi](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#winapi) -


## If you have a Roslyn Source Code Generator, please create an issue.
Expand All @@ -20,8 +20,30 @@ If you want to be notified each time I add a new RSCG example , please click htt

## Content

Those are the 218 Roslyn Source Code Generators that I have tested you can see and download source code example.
Those are the 219 Roslyn Source Code Generators that I have tested you can see and download source code example.
( including 14 from Microsoft )
### 219. [SKPromptGenerator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/SKPromptGenerator) , in the [AI](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#ai) category

Generated on : 2025-08-07 => 07 August 2025

<details>
<summary>Expand</summary>



Author: Charlie Chen

A source generator to automatically create classes from string prompts.

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


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

Source: [https://github.com/CharlieDigital/SKPromptGenerator](https://github.com/CharlieDigital/SKPromptGenerator)

</details>

### 218. [Nino](https://ignatandrei.github.io/RSCG_Examples/v2/docs/Nino) , in the [Serializer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#serializer) category

Generated on : 2025-08-06 => 06 August 2025
Expand Down
2 changes: 1 addition & 1 deletion later.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Just later

## Latest Update : 2025-08-06 => 06 August 2025
## Latest Update : 2025-08-07 => 07 August 2025



Expand Down
8 changes: 0 additions & 8 deletions v2/Generator/DocusaurusExample.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,9 @@ Those are taken from $(BaseIntermediateOutputPath)\GX
{{~ for fileContent in Description.Data.outputFiles.generatedFiles ~}}

<TabItem value="{{fileContent.fullPathFile}}" label="{{fileContent.file}}" >

{{~ if fileContent.content | string.contains "```" ~}}

{{fileContent.content}}

{{~ else ~}}

```csharp showLineNumbers
{{fileContent.content}}
```
{{end}}
</TabItem>

{{~ end ~}}
Expand Down
1 change: 1 addition & 0 deletions v2/Generator/MultiGeneratorV2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public string[] SourceNoRSCG()
var text=await File.ReadAllTextAsync(nameFile);
text = text.Replace("(img/", $"({d.Generator!.Source}/img/");
text=text.Replace("(README_IMAGE.png)", $"({d.Generator!.Source}/README_IMAGE.png)");
text = text.Replace("(README", $"({d.Generator!.Source}/README");
text = text.Replace("(integ-tests/", $"({d.Generator!.Source}/integ-tests/");
text = text.Replace("(./samples", $"({d.Generator!.Source}/samples");
text = text.Replace("(./tests", $"({d.Generator!.Source}/tests");
Expand Down
1 change: 1 addition & 0 deletions v2/Generator/all.csv
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,4 @@ Nr,Key,Source,Category
216,SG4MVC, https://github.com/SG4MVC/SG4MVC,MVC
217,EnumsEnhanced, https://github.com/snowberry-software/EnumsEnhanced,Enum
218,Nino, https://github.com/JasonXuDeveloper/Nino,Serializer
219,SKPromptGenerator, https://github.com/CharlieDigital/SKPromptGenerator,AI
1 change: 1 addition & 0 deletions v2/GeneratorData/Category.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ public enum Category
Console=34,
Async=35,
MVC=36,
AI=37,
}

6 changes: 6 additions & 0 deletions v2/RSCGExamplesData/GeneratorDataRec.json
Original file line number Diff line number Diff line change
Expand Up @@ -1317,5 +1317,11 @@
"Category": 16,
"dtStart": "2025-08-06T00:00:00",
"show": true
},
{
"ID":"SKPromptGenerator",
"Category": 37,
"dtStart": "2025-08-07T00:00:00",
"show": true
}
]
69 changes: 69 additions & 0 deletions v2/book/examples/SKPromptGenerator.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@

<h1>RSCG nr 219 : SKPromptGenerator</h1>

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

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

<p>Author :Charlie Chen</p>

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

<h2>About</h2>

Generate typed prompts for Semantic Kernel

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

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

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

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

<br />
The file <i>generated</i> is PromptTemplateBase.g.cs
<br />
<img src="images/SKPromptGenerator/generated/PromptTemplateBase.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/SKPromptGenerator'>
https://ignatandrei.github.io/RSCG_Examples/v2/docs/SKPromptGenerator
</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 218 RSCG with examples =>
This is the list of 219 RSCG with examples =>
</h1>

<table >
Expand Down Expand Up @@ -898,6 +898,10 @@ <h1>
<td>218</td>
<td><a href="examples/Nino.html">Nino</a></td>
</tr>
<tr>
<td>219</td>
<td><a href="examples/SKPromptGenerator.html">SKPromptGenerator</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 @@ -232,6 +232,7 @@ input-files:
- examples/SG4MVC.html
- examples/EnumsEnhanced.html
- examples/Nino.html
- examples/SKPromptGenerator.html

# or you may use input-file: with a single value
# defaults:
Expand Down
22 changes: 22 additions & 0 deletions v2/rscg_examples/SKPromptGenerator/description.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"generator":{
"name":"SKPromptGenerator",
"nuget":[
"https://www.nuget.org/packages/SKPromptGenerator/"
],
"link":"https://github.com/CharlieDigital/SKPromptGenerator",
"author":"Charlie Chen",
"source":"https://github.com/CharlieDigital/SKPromptGenerator"
},
"data":{
"goodFor":["Generate typed prompts for Semantic Kernel"],
"csprojDemo":"DemoAI.csproj",
"csFiles":["Program.cs","WeatherCity.cs"],
"excludeDirectoryGenerated":[""],
"includeAdditionalFiles":[""]
},
"links":{
"blog":"",
"video":""
}
}
1 change: 1 addition & 0 deletions v2/rscg_examples/SKPromptGenerator/nuget.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A source generator to automatically create classes from string prompts.
Loading