-
-
Notifications
You must be signed in to change notification settings - Fork 6
first #502
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
Merged
Merged
first #502
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| # Just later | ||
|
|
||
| ## Latest Update : 2026-05-13 => 13 May 2026 | ||
| ## Latest Update : 2026-05-14 => 14 May 2026 | ||
|
|
||
|
|
||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
|
|
||
| <h1>RSCG nr 269 : LinkDotNet.Enumeration</h1> | ||
|
|
||
| <h2>Info</h2> | ||
| Nuget : <a href="https://www.nuget.org/packages/LinkDotNet.Enumeration/" target="_blank">https://www.nuget.org/packages/LinkDotNet.Enumeration/</a> | ||
|
|
||
| <p>You can find more details at : <a href="https://github.com/linkdotnet/Enumeration" target="_blank"> https://github.com/linkdotnet/Enumeration</a></p> | ||
|
|
||
| <p>Author :Steven Giesel</p> | ||
|
|
||
| <p>Source: <a href="https://github.com/linkdotnet/Enumeration" target="_blank">https://github.com/linkdotnet/Enumeration</a> </p> | ||
|
|
||
| <h2>About</h2> | ||
|
|
||
| Generating enumeration from classes in C# with matching | ||
|
|
||
| <h2> | ||
| How to use | ||
| </h2> | ||
| <h3> | ||
| Add reference to the <a href="https://www.nuget.org/packages/LinkDotNet.Enumeration/" target="_blank">LinkDotNet.Enumeration</a> in the csproj | ||
| </h3> | ||
| <img src="images/LinkDotNet.Enumeration/EnumDemo.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/LinkDotNet.Enumeration/csFiles/Program.cs.png" width="580" height="580" /> | ||
| <hr /> | ||
|
|
||
| <br /> | ||
| I have <b>coded</b> the file CarTypes.cs | ||
| <br /> | ||
| <img src="images/LinkDotNet.Enumeration/csFiles/CarTypes.cs.png" width="580" height="580" /> | ||
| <hr /> | ||
| <h3>And here are the <i>generated</i> files</h3> | ||
|
|
||
| <br /> | ||
| The file <i>generated</i> is CarTypes.g.cs | ||
| <br /> | ||
| <img src="images/LinkDotNet.Enumeration/generated/CarTypes.g.cs.png" width="580" height="580" /> | ||
|
|
||
| <br /> | ||
| The file <i>generated</i> is EnumerationAttribute.g.cs | ||
| <br /> | ||
| <img src="images/LinkDotNet.Enumeration/generated/EnumerationAttribute.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/LinkDotNet.Enumeration'> | ||
| https://ignatandrei.github.io/RSCG_Examples/v2/docs/LinkDotNet.Enumeration | ||
| </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> | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| { | ||
| "generator":{ | ||
| "name":"LinkDotNet.Enumeration", | ||
| "nuget":[ | ||
| "https://www.nuget.org/packages/LinkDotNet.Enumeration/" | ||
| ], | ||
| "link":"https://github.com/linkdotnet/Enumeration", | ||
| "author":"Steven Giesel", | ||
| "source":"https://github.com/linkdotnet/Enumeration" | ||
| }, | ||
| "data":{ | ||
| "goodFor":["Good for replacing enum + switch patterns with string-based enumerations with exhaustive pattern matching.", | ||
| "", | ||
| "### Purpose", | ||
| "A source code generator that creates string-based enumerations (similar to Java enums / DDD value objects) with exhaustive pattern matching, replacing enum + switch patterns.", | ||
| "", | ||
| "### How to Define", | ||
| "[Enumeration(Casing.Preserve, \"None\", \"Dacia\", \"Tesla\", \"BMW\", \"Mercedes\")]", | ||
| "public sealed partial record CarTypes;", | ||
| "", | ||
| "### How to Use", | ||
| "CarTypes.TryParse(\"BMW\", null, out var car);", | ||
| "car.Match(onBMW: () => \"this is bmw\", onDacia: () => \"this is dacia\", ...);", | ||
| "", | ||
| "### Key Features", | ||
| "- Exhaustive matching: Match() requires all values", | ||
| "- Create / TryCreate: throws vs returns bool", | ||
| "- IParsable: Minimal APIs & Model Binding", | ||
| "- Implicit string conversion", | ||
| "- CarTypes.All returns FrozenSet of CarTypes", | ||
| "- JSON: GenerateJsonConverter = true" | ||
| ], | ||
| "csprojDemo":"EnumDemo.csproj", | ||
| "csFiles":["Program.cs","CarTypes.cs"], | ||
| "excludeDirectoryGenerated":[""], | ||
| "includeAdditionalFiles":[""] | ||
| }, | ||
| "links":{ | ||
| "blog":"", | ||
| "video":"" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Source code generated enumeration with completeness! |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Escape the special character in HTML.
The
>character should be escaped as>in HTML content.🔧 Proposed fix
📝 Committable suggestion
🧰 Tools
🪛 HTMLHint (1.9.2)
[error] 20-20: Special characters must be escaped : [ > ].
(spec-char-escape)
🤖 Prompt for AI Agents