Skip to content

Commit

Permalink
adding ntypewriter
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatandrei committed Feb 15, 2025
1 parent e83dd1d commit c8cca00
Show file tree
Hide file tree
Showing 76 changed files with 2,199 additions and 749 deletions.
291 changes: 171 additions & 120 deletions README.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions v2/Generator/all.csv
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,4 @@ Nr,Key,Source,Category
180,Pure.DI, https://github.com/DevTeam/Pure.DI,DependencyInjection
181,Larcanum.GitInfo, https://github.com/lord-executor/Larcanum.GitInfo,EnhancementProject
182,rscg_Interface_to_null_object, https://github.com/ignatandrei/rscg_Interface_to_null_object/,Interface
183,NTypewriter, https://github.com/NeVeSpl/NTypewriter,Templating
6 changes: 6 additions & 0 deletions v2/RSCGExamplesData/GeneratorDataRec.json
Original file line number Diff line number Diff line change
Expand Up @@ -1097,5 +1097,11 @@
"dtStart": "2025-01-18T00:00:00",
"show": true

},
{
"ID":"NTypewriter",
"Category": 12,
"dtStart": "2025-01-19T00:00:00",
"show":true
}
]
8 changes: 4 additions & 4 deletions v2/RSCGExamplesData/NoExample.json
Original file line number Diff line number Diff line change
Expand Up @@ -871,23 +871,23 @@
"why":"later"
},
{
"ID": 101,
"ID": 191,
"name":"https://github.com/usausa/service-registration-generator",
"why":"later"
},
{
"ID":102,
"ID":192,
"name":"https://github.com/TarasKovalenko/EntityLengths.Generator/",
"why":"later"
}
,
{
"ID":103,
"ID":193,
"name":"https://github.com/connorivy/MockMe/",
"why":"later"
},
{
"ID":104,
"ID":194,
"name":"https://github.com/ramhari-dev/PropGenAoT",
"why":"later"
}
Expand Down
5 changes: 5 additions & 0 deletions v2/book/examples/Dusharp.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ <h3>And here are the <i>generated</i> files</h3>
<br />
<img src="images/Dusharp/generated/UnionTypesDemo.ResultSave.Dusharp.g.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is UnionTypesDemo.ResultSave.union.g.cs
<br />
<img src="images/Dusharp/generated/UnionTypesDemo.ResultSave.union.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/Dusharp'>
Expand Down
5 changes: 0 additions & 5 deletions v2/book/examples/Equatable.Generator.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ <h3>And here are the <i>generated</i> files</h3>
<br />
<img src="images/Equatable.Generator/generated/GeneratorEqualsDemo.Person.Equatable.g.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is GeneratorEqualsDemo.Person.Generator.Equals.g.cs
<br />
<img src="images/Equatable.Generator/generated/GeneratorEqualsDemo.Person.Generator.Equals.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/Equatable.Generator'>
Expand Down
50 changes: 50 additions & 0 deletions v2/book/examples/InterceptorTemplate.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,56 @@ <h3>This was for me the <b>starting</b> code</h3>
<hr />
<h3>And here are the <i>generated</i> files</h3>

<br />
The file <i>generated</i> is RSCG_DemoObjects.IPersonLoader_InsertPerson_10.cs
<br />
<img src="images/InterceptorTemplate/generated/RSCG_DemoObjects.IPersonLoader_InsertPerson_10.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is RSCG_DemoObjects.PersonLoader_Connect_9.cs
<br />
<img src="images/InterceptorTemplate/generated/RSCG_DemoObjects.PersonLoader_Connect_9.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is RSCG_DemoObjects.PersonLoader_SavePerson_8.cs
<br />
<img src="images/InterceptorTemplate/generated/RSCG_DemoObjects.PersonLoader_SavePerson_8.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is RSCG_DemoObjects.Person_FullName_1.cs
<br />
<img src="images/InterceptorTemplate/generated/RSCG_DemoObjects.Person_FullName_1.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is RSCG_DemoObjects.Person_FullName_3.cs
<br />
<img src="images/InterceptorTemplate/generated/RSCG_DemoObjects.Person_FullName_3.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is RSCG_DemoObjects.Person_PersonsLoaded_4.cs
<br />
<img src="images/InterceptorTemplate/generated/RSCG_DemoObjects.Person_PersonsLoaded_4.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is RSCG_DemoObjects.Person_PersonsLoaded_5.cs
<br />
<img src="images/InterceptorTemplate/generated/RSCG_DemoObjects.Person_PersonsLoaded_5.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is RSCG_DemoObjects.Person_ShowRandomPersonNumber_7.cs
<br />
<img src="images/InterceptorTemplate/generated/RSCG_DemoObjects.Person_ShowRandomPersonNumber_7.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is RSCG_DemoObjects.Person_TestFullNameWithArguments_6.cs
<br />
<img src="images/InterceptorTemplate/generated/RSCG_DemoObjects.Person_TestFullNameWithArguments_6.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is RSCG_DemoObjects.Person_Test_2.cs
<br />
<img src="images/InterceptorTemplate/generated/RSCG_DemoObjects.Person_Test_2.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/InterceptorTemplate'>
Expand Down
64 changes: 64 additions & 0 deletions v2/book/examples/NTypewriter.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

<h1>RSCG nr 183 : NTypewriter</h1>

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

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

<p>Author :NeVeSpl</p>

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

<h2>About</h2>

Generating code with a template from classes in project

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

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

<br />
The file <i>generated</i> is diagnostics-initialization.g.cs
<br />
<img src="images/NTypewriter/generated/diagnostics-initialization.g.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is diagnostics-sg-last-run.g.cs
<br />
<img src="images/NTypewriter/generated/diagnostics-sg-last-run.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/NTypewriter'>
https://ignatandrei.github.io/RSCG_Examples/v2/docs/NTypewriter
</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>

5 changes: 5 additions & 0 deletions v2/book/examples/PlantUmlClassDiagramGenerator.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ <h3>And here are the <i>generated</i> files</h3>
<br />
<img src="images/PlantUmlClassDiagramGenerator/generated/Attributes.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is Person.puml
<br />
<img src="images/PlantUmlClassDiagramGenerator/generated/Person.puml.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/PlantUmlClassDiagramGenerator'>
Expand Down
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 182 RSCG with examples =>
This is the list of 183 RSCG with examples =>
</h1>

<table >
Expand Down Expand Up @@ -754,6 +754,10 @@ <h1>
<td>182</td>
<td><a href="examples/rscg_Interface_to_null_object.html">rscg_Interface_to_null_object</a></td>
</tr>
<tr>
<td>183</td>
<td><a href="examples/NTypewriter.html">NTypewriter</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 @@ -196,6 +196,7 @@ input-files:
- examples/Pure.DI.html
- examples/Larcanum.GitInfo.html
- examples/rscg_Interface_to_null_object.html
- examples/NTypewriter.html

# or you may use input-file: with a single value
# defaults:
Expand Down
14 changes: 10 additions & 4 deletions v2/rscg_examples/Dusharp/src/.tours/Dusharp.tour
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,33 @@
}


,{
"file": "UnionTypesDemo/obj/GX/Sera.TaggedUnion.Analyzers/Sera.TaggedUnion.Analyzers.Generators.UnionGenerator/UnionTypesDemo.ResultSave.union.g.cs",
"description": "Generated File 5 from 5 : UnionTypesDemo.ResultSave.union.g.cs ",
"line": 1
}

,{
"file": "UnionTypesDemo/obj/GX/Dusharp/Dusharp.UnionSourceGenerator/UnionTypesDemo.ResultSave.Dusharp.g.cs",
"description": "Generated File 4 from 4 : UnionTypesDemo.ResultSave.Dusharp.g.cs ",
"description": "Generated File 4 from 5 : UnionTypesDemo.ResultSave.Dusharp.g.cs ",
"line": 1
}

,{
"file": "UnionTypesDemo/obj/GX/Dusharp/Dusharp.UnionSourceGenerator/Dusharp.EmbeddedCode.UnionCaseAttribute.cs",
"description": "Generated File 3 from 4 : Dusharp.EmbeddedCode.UnionCaseAttribute.cs ",
"description": "Generated File 3 from 5 : Dusharp.EmbeddedCode.UnionCaseAttribute.cs ",
"line": 1
}

,{
"file": "UnionTypesDemo/obj/GX/Dusharp/Dusharp.UnionSourceGenerator/Dusharp.EmbeddedCode.UnionAttribute.cs",
"description": "Generated File 2 from 4 : Dusharp.EmbeddedCode.UnionAttribute.cs ",
"description": "Generated File 2 from 5 : Dusharp.EmbeddedCode.UnionAttribute.cs ",
"line": 1
}

,{
"file": "UnionTypesDemo/obj/GX/Dusharp/Dusharp.UnionSourceGenerator/Dusharp.EmbeddedCode.ExceptionUtils.cs",
"description": "Generated File 1 from 4 : Dusharp.EmbeddedCode.ExceptionUtils.cs ",
"description": "Generated File 1 from 5 : Dusharp.EmbeddedCode.ExceptionUtils.cs ",
"line": 1
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,9 @@
}


,{
"file": "GeneratorEqualsDemo/obj/GX/Generator.Equals/Generator.Equals.EqualsGenerator/GeneratorEqualsDemo.Person.Generator.Equals.g.cs",
"description": "Generated File 2 from 2 : GeneratorEqualsDemo.Person.Generator.Equals.g.cs ",
"line": 1
}

,{
"file": "GeneratorEqualsDemo/obj/GX/Equatable.SourceGenerator/Equatable.SourceGenerator.EquatableGenerator/GeneratorEqualsDemo.Person.Equatable.g.cs",
"description": "Generated File 1 from 2 : GeneratorEqualsDemo.Person.Equatable.g.cs ",
"description": "Generated File 1 from 1 : GeneratorEqualsDemo.Person.Equatable.g.cs ",
"line": 1
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,66 @@
}


,{
"file": "RSCG_InterceptorTemplateConsole/obj/GX/RSCG_InterceptorTemplate/RSCG_InterceptorTemplate.MethodIntercept/RSCG_DemoObjects.Person_Test_2.cs",
"description": "Generated File 10 from 10 : RSCG_DemoObjects.Person_Test_2.cs ",
"line": 1
}

,{
"file": "RSCG_InterceptorTemplateConsole/obj/GX/RSCG_InterceptorTemplate/RSCG_InterceptorTemplate.MethodIntercept/RSCG_DemoObjects.Person_TestFullNameWithArguments_6.cs",
"description": "Generated File 9 from 10 : RSCG_DemoObjects.Person_TestFullNameWithArguments_6.cs ",
"line": 1
}

,{
"file": "RSCG_InterceptorTemplateConsole/obj/GX/RSCG_InterceptorTemplate/RSCG_InterceptorTemplate.MethodIntercept/RSCG_DemoObjects.Person_ShowRandomPersonNumber_7.cs",
"description": "Generated File 8 from 10 : RSCG_DemoObjects.Person_ShowRandomPersonNumber_7.cs ",
"line": 1
}

,{
"file": "RSCG_InterceptorTemplateConsole/obj/GX/RSCG_InterceptorTemplate/RSCG_InterceptorTemplate.MethodIntercept/RSCG_DemoObjects.Person_PersonsLoaded_5.cs",
"description": "Generated File 7 from 10 : RSCG_DemoObjects.Person_PersonsLoaded_5.cs ",
"line": 1
}

,{
"file": "RSCG_InterceptorTemplateConsole/obj/GX/RSCG_InterceptorTemplate/RSCG_InterceptorTemplate.MethodIntercept/RSCG_DemoObjects.Person_PersonsLoaded_4.cs",
"description": "Generated File 6 from 10 : RSCG_DemoObjects.Person_PersonsLoaded_4.cs ",
"line": 1
}

,{
"file": "RSCG_InterceptorTemplateConsole/obj/GX/RSCG_InterceptorTemplate/RSCG_InterceptorTemplate.MethodIntercept/RSCG_DemoObjects.Person_FullName_3.cs",
"description": "Generated File 5 from 10 : RSCG_DemoObjects.Person_FullName_3.cs ",
"line": 1
}

,{
"file": "RSCG_InterceptorTemplateConsole/obj/GX/RSCG_InterceptorTemplate/RSCG_InterceptorTemplate.MethodIntercept/RSCG_DemoObjects.Person_FullName_1.cs",
"description": "Generated File 4 from 10 : RSCG_DemoObjects.Person_FullName_1.cs ",
"line": 1
}

,{
"file": "RSCG_InterceptorTemplateConsole/obj/GX/RSCG_InterceptorTemplate/RSCG_InterceptorTemplate.MethodIntercept/RSCG_DemoObjects.PersonLoader_SavePerson_8.cs",
"description": "Generated File 3 from 10 : RSCG_DemoObjects.PersonLoader_SavePerson_8.cs ",
"line": 1
}

,{
"file": "RSCG_InterceptorTemplateConsole/obj/GX/RSCG_InterceptorTemplate/RSCG_InterceptorTemplate.MethodIntercept/RSCG_DemoObjects.PersonLoader_Connect_9.cs",
"description": "Generated File 2 from 10 : RSCG_DemoObjects.PersonLoader_Connect_9.cs ",
"line": 1
}

,{
"file": "RSCG_InterceptorTemplateConsole/obj/GX/RSCG_InterceptorTemplate/RSCG_InterceptorTemplate.MethodIntercept/RSCG_DemoObjects.IPersonLoader_InsertPerson_10.cs",
"description": "Generated File 1 from 10 : RSCG_DemoObjects.IPersonLoader_InsertPerson_10.cs ",
"line": 1
}

],

"ref": "main"
Expand Down
22 changes: 22 additions & 0 deletions v2/rscg_examples/NTypewriter/description.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"generator":{
"name":"NTypewriter",
"nuget":[
"https://www.nuget.org/packages/NTypewriter.SourceGenerator"
],
"link":"https://github.com/NeVeSpl/NTypewriter",
"author":"NeVeSpl",
"source":"https://github.com/NeVeSpl/NTypewriter"
},
"data":{
"goodFor":["Generating code with a template from classes in project"],
"csprojDemo":"DemoTemplateConsole.csproj",
"csFiles":["Program.cs","Person.cs"],
"excludeDirectoryGenerated":[""],
"includeAdditionalFiles":[""]
},
"links":{
"blog":"",
"video":""
}
}
1 change: 1 addition & 0 deletions v2/rscg_examples/NTypewriter/nuget.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Package Description
Loading

0 comments on commit c8cca00

Please sign in to comment.