📄️ What is UnionGenerator?
UnionGenerator is a powerful C# source generator that brings compile-time discriminated unions to .NET. It eliminates boilerplate code, enables type-safe error handling, and provides exhaustive pattern matching—all with zero runtime overhead.
📄️ Why Discriminated Unions?
Discriminated unions (also called tagged unions or sum types) are one of the most powerful tools in modern type systems. They allow you to model data that can be one of several variants, each with its own shape and data.
📄️ Key Features
UnionGenerator provides a comprehensive set of features that make discriminated unions powerful and ergonomic in C#.
📄️ Installation
Get started with UnionGenerator in minutes. Choose the packages you need based on your use case.