https://github.com/badeend/enumclass
Enums with payloads. Or for the fancy pants: discriminated unions for C# with compile-time exhaustiveness checking, implemented using closed type hierarchies.
https://github.com/badeend/enumclass
analyzer csharp discriminated-unions exhaustiveness-checking
Last synced: 3 months ago
JSON representation
Enums with payloads. Or for the fancy pants: discriminated unions for C# with compile-time exhaustiveness checking, implemented using closed type hierarchies.
- Host: GitHub
- URL: https://github.com/badeend/enumclass
- Owner: badeend
- License: mit
- Created: 2024-05-26T15:00:00.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-01T13:58:33.000Z (over 1 year ago)
- Last Synced: 2025-02-23T00:52:20.739Z (8 months ago)
- Topics: analyzer, csharp, discriminated-unions, exhaustiveness-checking
- Language: C#
- Homepage: https://badeend.github.io/EnumClass/
- Size: 135 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
![]()
Enums with payloads---
This is an analyzer-only package that aims to provide a dead simple, yet complete, "discriminated unions" experience for C# with compile-time exhaustiveness checking.
**More information on the project website: https://badeend.github.io/EnumClass/**
---
### Shameless self-promotion
May I interest you in one of my other packages?
- **[Badeend.ValueCollections](https://badeend.github.io/ValueCollections/)**: _Low overhead immutable collection types with structural equality._
- **[Badeend.EnumClass](https://badeend.github.io/EnumClass/)**: _Discriminated unions for C# with exhaustiveness checking._
- **[Badeend.Result](https://badeend.github.io/Result/)**: _For failures that are not exceptional: `Result` for C#._
- **[Badeend.Any](https://badeend.github.io/Any/)**: _Holds any value of any type, without boxing small structs (up to 8 bytes)._
- **[Badeend.Nothing](https://github.com/badeend/Nothing)**: _If you want to use `void` as a type parameter, but C# won't let you._