An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          


EnumClass


Enums with payloads


Nuget

---

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._