Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valuify #340

Merged
merged 4 commits into from
Dec 20, 2024
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
34 changes: 28 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# RSCG - 177 Examples of Roslyn Source Code Generators / 14 created by Microsoft /
# RSCG - 178 Examples of Roslyn Source Code Generators / 14 created by Microsoft /

## Latest Update : 2024-12-05 => 05 December 2024
## Latest Update : 2024-12-06 => 06 December 2024

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) -[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) -[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) -[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) -[mapper](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mapper) -[mediator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mediator) -[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) -[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) -[aop](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#aop) -[api](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#api) -[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) -[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) -[mapper](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mapper) -[mediator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mediator) -[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) -[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,9 +20,31 @@ If you want to be notified each time I add a new RSCG example , please click htt

## Content

Those are the 177 Roslyn Source Code Generators that I have tested you can see and download source code example.
Those are the 178 Roslyn Source Code Generators that I have tested you can see and download source code example.
( including 14 from Microsoft )
### 177. [Equatable.Generator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/Equatable.Generator) , in the [EnhancementClass](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementclass) category
### 178. [Valuify](https://ignatandrei.github.io/RSCG_Examples/v2/docs/Valuify) , in the [Equals](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#equals) category

Generated on : 2024-12-06 => 06 December 2024

<details>
<summary>Expand</summary>



Author: Paul Martins

A .NET Roslyn source generator that enables record-like behavior for classes in projects using C# versions prior to 9.0.

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


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

Source: [https://github.com/MooVC/valuify](https://github.com/MooVC/valuify)

</details>

### 177. [Equatable.Generator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/Equatable.Generator) , in the [Equals](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#equals) category

Generated on : 2024-12-05 => 05 December 2024

Expand Down Expand Up @@ -3107,7 +3129,7 @@ Source: [https://github.com/DevTeam/Immutype](https://github.com/DevTeam/Immutyp

</details>

### 41. [GeneratorEquals](https://ignatandrei.github.io/RSCG_Examples/v2/docs/GeneratorEquals) , in the [EnhancementClass](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementclass) category
### 41. [GeneratorEquals](https://ignatandrei.github.io/RSCG_Examples/v2/docs/GeneratorEquals) , in the [Equals](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#equals) category

Generated on : 2023-08-11 => 11 August 2023

Expand Down
1 change: 1 addition & 0 deletions v2/Generator/MultiGeneratorV2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ public string[] SourceNoRSCG()
text = text.Replace("(doc/", $"({d.Generator!.Source}/doc/");
text = text.Replace("(docs/rules/", $"({d.Generator!.Source}/docs/rules/");
text = text.Replace("(CHANGELOG.md", $"({d.Generator!.Source}/CHANGELOG.md");
text = text.Replace("(/.github/CONTRIBUTING.md)", $"({d.Generator!.Source}/.github/CONTRIBUTING.md)");

text = text.Replace("(img/", $"({d.Generator!.Source}/img/");
text = text.Replace("(RoseLynn.GenericsAnalyzer/)", $"({d.Generator!.Source}/RoseLynn.GenericsAnalyzer/)");
Expand Down
5 changes: 3 additions & 2 deletions v2/Generator/all.csv
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Nr,Key,Source,Category
38,EnumClass, https://github.com/ashenBlade/EnumClass,Enum
39,Breezy, https://github.com/Ludovicdln/Breezy,Database
40,FastGenericNew, https://github.com/Nyrest/FastGenericNew,EnhancementClass
41,GeneratorEquals, https://github.com/diegofrata/Generator.Equals,EnhancementClass
41,GeneratorEquals, https://github.com/diegofrata/Generator.Equals,Equals
42,Immutype, https://github.com/DevTeam/Immutype,EnhancementClass
43,spreadcheetah, https://github.com/sveinungf/spreadcheetah,Templating
44,zomp, https://github.com/zompinc/sync-method-generator,EnhancementClass
Expand Down Expand Up @@ -175,4 +175,5 @@ Nr,Key,Source,Category
174,Dapper.AOT, https://github.com/DapperLib/DapperAOT,Database
175,Dolly, https://github.com/AnderssonPeter/Dolly,Clone
176,Darp.BinaryObjects, https://github.com/rosslight/Darp.BinaryObjects,Bitwise
177,Equatable.Generator, https://github.com/loresoft/Equatable.Generator,EnhancementClass
177,Equatable.Generator, https://github.com/loresoft/Equatable.Generator,Equals
178,Valuify, https://github.com/MooVC/valuify,Equals
1 change: 1 addition & 0 deletions v2/GeneratorData/Category.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ public enum Category
SignalR=27,
WinAPI = 28,
Clone=29,
Equals= 30,
}

11 changes: 9 additions & 2 deletions v2/RSCGExamplesData/GeneratorDataRec.json
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
},
{
"ID": "GeneratorEquals",
"Category": 5,
"Category": 30,
"dtStart": "2023-08-11T00:00:00",
"show": true
},
Expand Down Expand Up @@ -1062,8 +1062,15 @@
},
{
"ID": "Equatable.Generator",
"Category": 5,
"Category": 30,
"dtStart": "2024-12-05T00:00:00",
"show": true
}
,
{
"ID": "Valuify",
"Category": 30,
"dtStart": "2024-12-06T00:00:00",
"show": true
}
]
104 changes: 104 additions & 0 deletions v2/book/examples/Valuify.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@

<h1>RSCG nr 178 : Valuify</h1>

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

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

<p>Author :Paul Martins</p>

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

<h2>About</h2>

Generating Equals from properties

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

<br />
I have <b>coded</b> the file Person.cs
<br />
<img src="images/Valuify/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 ValuifyAttribute.g.cs
<br />
<img src="images/Valuify/generated/ValuifyAttribute.g.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is GeneratorEqualsDemo.Person.Equality.g.cs
<br />
<img src="images/Valuify/generated/GeneratorEqualsDemo.Person.Equality.g.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is GeneratorEqualsDemo.Person.Equals.g.cs
<br />
<img src="images/Valuify/generated/GeneratorEqualsDemo.Person.Equals.g.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is GeneratorEqualsDemo.Person.GetHashCode.g.cs
<br />
<img src="images/Valuify/generated/GeneratorEqualsDemo.Person.GetHashCode.g.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is GeneratorEqualsDemo.Person.IEquatable.Equals.g.cs
<br />
<img src="images/Valuify/generated/GeneratorEqualsDemo.Person.IEquatable.Equals.g.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is GeneratorEqualsDemo.Person.IEquatable.g.cs
<br />
<img src="images/Valuify/generated/GeneratorEqualsDemo.Person.IEquatable.g.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is GeneratorEqualsDemo.Person.Inequality.g.cs
<br />
<img src="images/Valuify/generated/GeneratorEqualsDemo.Person.Inequality.g.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is GeneratorEqualsDemo.Person.ToString.g.cs
<br />
<img src="images/Valuify/generated/GeneratorEqualsDemo.Person.ToString.g.cs.png" width="580" height="580" />

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

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

<table >
Expand Down Expand Up @@ -734,6 +734,10 @@ <h1>
<td>177</td>
<td><a href="examples/Equatable.Generator.html">Equatable.Generator</a></td>
</tr>
<tr>
<td>178</td>
<td><a href="examples/Valuify.html">Valuify</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 @@ -191,6 +191,7 @@ input-files:
- examples/Dolly.html
- examples/Darp.BinaryObjects.html
- examples/Equatable.Generator.html
- examples/Valuify.html

# or you may use input-file: with a single value
# defaults:
Expand Down
22 changes: 22 additions & 0 deletions v2/rscg_examples/Valuify/description.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"generator":{
"name":"Valuify",
"nuget":[
"https://www.nuget.org/packages/Valuify/"
],
"link":"https://github.com/MooVC/valuify",
"author":"Paul Martins",
"source":"https://github.com/MooVC/valuify"
},
"data":{
"goodFor":["Generating Equals from properties"],
"csprojDemo":"GeneratorEqualsDemo.csproj",
"csFiles":["Program.cs","Person.cs"],
"excludeDirectoryGenerated":[""],
"includeAdditionalFiles":[""]
},
"links":{
"blog":"",
"video":""
}
}
1 change: 1 addition & 0 deletions v2/rscg_examples/Valuify/nuget.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A .NET Roslyn source generator that enables record-like behavior for classes in projects using C# versions prior to 9.0.
Loading
Loading