Orx.Fun.Result Namespace

A simple result type for C#, not minding the error type, instead aiming to be explicit, concise and fluent.
  • Res: Ok or Err.
  • Res<T>: Ok(T) or Err.
In order to enable the types globally, add the following in project's global usings file:
C#
global using Orx.Fun.Result;
global using static Orx.Fun.Result.ResultExtensions.

Classes

ErrConfig Static configurations for error messages of the Err variant of Res or ResT result types.
ResultExtensions Extension methods for the result types Res and ResT.
ResultExtensionsLinq Extension methods for linq methods using the result types Res and ResT.

Structures

Res Valueless result type which can be either of the two variants: Ok or Err(error-message).
ResT Result type which can be either of the two variants: Ok(value-of-T) or Err(error-message).