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.
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...
More information
CodeJam is a set of handy reusable .NET components that can simplify your daily work and save your time when you copy and paste your favorite helper methods and classes from one project to another.
ExhaustiveMatching.Analyzer adds exhaustive matching to C# switch statements and expressions.
Get compiler errors for missing cases in a switch statement or expression. Mark which switches should have exhaustiveness checking by throwing an exception in the default case. Exhaustiveness checking...
More information
Implementation of Discriminated Union and Pattern Matching in C#.
string outputValue = x.Match<String>()
.Case(c => c == "Test", v => "It's Test!")
.Case(v => "It's Not Test!")
.Else(() => "It's None!")
or
var x = new Union<string, int>(100);
// the type annotations...
More information
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.
Provides extension methods to materialize query results while describing failures using discriminated unions.
An `IQueryable` version of `OneOf.Linq`.
This package is for Entity Framework Core. For an identical API on Entity Framework 6.x, see `FGS.Linq.Extensions.EntityFramework6`.
Provides extension methods to augment OneOf's F#-style discriminated unions with the LINQ-like syntax introduced in Mark Seemann's "Humane Code" video series.
Allows the use of multiple `OneOf` values in quick succession without large syntactic overhead.
Immutable persistent collections, algebraic sum-type aka descriminated union, Ref type and supportive extensions for performant functional programming in C#.
Split from the DryIoc: https://github.com/dadhi/DryIoc
Immutable persistent collections, algebraic sum-type aka descriminated union, Ref type and supportive extensions for performant functional programming in C#.
Split from the DryIoc: https://github.com/dadhi/DryIoc