A simple, fluent discriminated union of an error or a result. `dotnet add package ErrorOr` - [Give it a star ⭐!](#give-it-a-star-) - [Getting Started](#getting-started) - [Single Error](#single-error) - [This 👇🏽](#this-) - [Turns into this 👇🏽](#turns-into-this-) - [This 👇🏽](#this--1) - [Turns into this 👇🏽](#turns-into-this--1) - [Multiple Errors](#multiple-errors) - [A more practical example](#a-more-practical-example) - [Dropping the exceptions throwing logic](#dropping-the-exceptions-throwing-logic) - [Usage](#usage) - [Creating an `ErrorOr`](#creating-an-errororresult) - [From Value, using implicit conversion](#from-value-using-implicit-conversion) - [From Value, using `ErrorOrFactory.From`](#from-value-using-errororfactoryfrom) - [From Single Error](#from-single-error) - [From List of Errors, using implicit conversion](#from-list-of-errors-using-implicit-conversion) - [From List of Errors, using `From`](#from-list-of-errors-using-from) - [Checking if the `ErrorOr` is an error](#checking-if-the-errororresult-is-an-error) - [Accessing the `ErrorOr` result](#accessing-the-errororresult-result) - [Accessing the Value (`result.Value`)](#accessing-the-value-resultvalue) - [Accessing the List of Errors (`result.Errors`)](#accessing-the-list-of-errors-resulterrors) - [Accessing the First Error (`result.FirstError`)](#accessing-the-first-error-resultfirsterror) - [Accessing the Errors or an empty list (`result.ErrorsOrEmptyList`)](#accessing-the-errors-or-an-empty-list-resulterrorsoremptylist) - [Performing actions based on the `ErrorOr` result](#performing-actions-based-on-the-errororresult-result) - [`Match` / `MatchAsync`](#match--matchasync) - [`MatchFirst` / `MatchFirstAsync`](#matchfirst--matchfirstasync) - [`Switch` / `SwitchAsync`](#switch--switchasync) - [`SwitchFirst` / `SwitchFirstAsync`](#switchfirst--switchfirstasync) - [Error Types](#error-types) - [Built-in Error Types](#built-in-error-types) - [Custom error types](#custom-error-types) - [Why would I want to categorize my errors?](#why-would-i-want-to-categorize-my-errors) - [Built in result types](#built-in-result-types) - [How Is This Different From `OneOf` or `FluentResults`?](#how-is-this-different-from-oneoft0-t1-or-fluentresults) - [Contribution](#contribution) - [Credits](#credits) - [License](#license)