66 packages tagged with “unions”
F# style discriminated unions for C#, using a custom type OneOf<T0, ... Tn> which holds a single value and has a .Match(...) method on it for exhaustive matching. Simple but powerful.
This source generator automaticly implements OneOfBase hierarchies
This package extends the OneOf types from OneOf<T0, .., T9> to OneOf<T0, .., T32> for when you really have a lot of options
Json serialization converters for F# option types and discriminated unions.
This is an FSharp library for interop with the C# OneOf Types
Suppresses exhaustiveness warnings of switch statement and switch expressions when all cases of a "closed type hierarchy" are covered. See project URL for details. It suppresses IDE0010, IDE0072 and CS8509. It is NRT-aware.
Succinc<T> is a .NET library that adds a number of functional features to C#: * Discriminated unions, * Pattern matching, * Partial applications, * "Implicitly" typed lambdas, * The ability to treat void methods as Unit functions, * Replacements for TryParse methods that return an Option<T> (or Maybe<T>, if you prefer), rather than using the out parameter anti-pattern. * "cons" support for IEnumerable<T> (add elements to the head of an enumeration, or split an enumeration into its head element and an enumeration containing the remaining items, all without repeatedly enumerating that enumerable). * Indexed enumerations, * Cycle() methods that endlessly repeat an enumeration, again without repeatedly enumerating that enumerable). * Replacements for IEnumerable<T>'s XXXOrDefault methods that return an Option<T> (or Maybe<T>, if you prefer), avoiding null and the "did it return a value, or the default?" problem, * And finally, basic parameter piping support.
Design and build-time code-gen for records, unions, lenses and immutable With functions
A small package allowing you to use Union Structs
This package provides Discriminated Unions for C#. This is the old backage. The new package is FunctionalSharp.DiscriminatedUnions.
Portable library for easy to use F#-like Discriminated Unions in C#. Implicitly casts objects into OneOf instances, then use .Match extension to do pattern matching. Designed as a partial drop in replacement for OneOf.
OneOf Extensions
The Source Generator for AterraEngine.Unions
UnionStruct is a C# source generator for creating memory-efficient union structs.
F# style discriminated unions or C#, using a custom type OneOf<T0, ... Tn> which holds a single value and has a .Match(...) method on it for exhaustive matching. Simple but powerful.
Package Description
Tagged union for c#
Suppresses exhaustiveness warnings of switch statement and switch expressions on OneOf<...>.Value from the OneOf library when all type arguments are covered. See project URL for details. It suppresses IDE0010, IDE0072 and CS8509. It is NRT-aware.
Dusharp is a C# source generator for creating discriminated unions.
Discriminated unions for C#, based on the well-known OneOf package, with modified functionality and other improvements
Generic discriminating union types to be used as results when you want to make sure every return type is handled explicitly.
Contains union-types representing either a successful result or a union-list of possible errors
A highly configurable C# discriminated union library
Contains Result, Option and Union types to use in C#