LanguageExt.Core

LanguageExt.Core Monads Alternative Value Monads Either Either-Shared

Contents

class EitherData Source #

Methods

method EitherData<L, R> Right <L, R> (R rightValue) Source #

method EitherData<L, R> Left <L, R> (L leftValue) Source #

method EitherData<L, R> Bottom <L, R> () Source #

class EitherData <L, R> Source #

Constructors

constructor EitherData (EitherStatus state, R right, L left) Source #

Methods

method int GetHashCode () Source #

method bool Equals (EitherData<L, R> other) Source #

method bool Equals (object obj) Source #

method string ToString () Source #

Operators

operator == (EitherData<L, R> x, EitherData<L, R> y) Source #

operator != (EitherData<L, R> x, EitherData<L, R> y) Source #

class EitherDataExtensions Source #

Methods

method Either<L, R> ToEither <L, R> (this EitherData<L, R> input) Source #

method EitherAsync<L, R> ToEitherAsync <L, R> (this EitherData<L, R> input) Source #

method Task<EitherAsync<L, R>> ToEitherAsync <L, R> (this Task<EitherData<L, R>> input) Source #

method Task<EitherAsync<L, R>> ToEitherAsync <L, R> (this ValueTask<EitherData<L, R>> input) Source #

method EitherUnsafe<L, R> ToEitherUnsafe <L, R> (this EitherData<L, R> input) Source #

method Fin<A> ToFin <E, A> (this EitherData<E, A> input) Source #

where E : Error

method Try<A> ToTry <E, A> (this EitherData<E, A> input) Source #

where E : Exception

method TryAsync<A> ToTryAsync <E, A> (this EitherData<E, A> input) Source #

where E : Exception

method Task<TryAsync<A>> ToTryAsync <E, A> (this Task<EitherData<E, A>> input) Source #

where E : Exception

method Task<TryAsync<A>> ToTryAsync <E, A> (this ValueTask<EitherData<E, A>> input) Source #

where E : Exception

struct EitherLeft <L> Source #

Properties

property bool IsRight Source #

property bool IsLeft Source #

Methods

method void GetObjectData (SerializationInfo info, StreamingContext context) Source #

method EitherLeft<L> Select (Func<L, L> f) Source #

method EitherLeft<L> SelectMany (Func<L, EitherLeft<L>> f) Source #

method Either<L, R> SelectMany <R, B> (Func<L, EitherLeft<R>> f) Source #

method EitherLeft<C> SelectMany <C> (Func<L, EitherLeft<L>> bind, Func<L, Unit, C> project) Source #

method Either<L, C> SelectMany <B, C> (Func<L, EitherLeft<B>> bind, Func<L, B, C> project) Source #

method Either<L, B> SelectMany <B> (Func<L, Either<L, B>> f) Source #

method Either<L, C> SelectMany <B, C> (Func<L, Either<L, B>> bind, Func<L, B, C> project) Source #

method string ToString () Source #

method int GetHashCode () Source #

method bool Equals (object obj) Source #

method Lst<L> ToList () Source #

method Arr<L> ToArray () Source #

method Seq<L> ToSeq () Source #

method IEnumerable<L> AsEnumerable () Source #

method EitherUnsafe<L, R> ToEitherUnsafe <R> () Source #

method int CompareTo (EitherLeft<L> other) Source #

method int CompareTo (L other) Source #

method bool Equals (L other) Source #

method bool Equals (EitherLeft<L> other) Source #

method TResult MatchUntyped <TResult> (Func<object, TResult> Right, Func<object, TResult> Left) Source #

method Either<L, R> Bind <R> () Source #

Operators

operator < (EitherLeft<L> lhs, EitherLeft<L> rhs) Source #

operator <= (EitherLeft<L> lhs, EitherLeft<L> rhs) Source #

operator > (EitherLeft<L> lhs, EitherLeft<L> rhs) Source #

operator >= (EitherLeft<L> lhs, EitherLeft<L> rhs) Source #

operator == (EitherLeft<L> lhs, EitherLeft<L> rhs) Source #

operator != (EitherLeft<L> lhs, EitherLeft<L> rhs) Source #

operator | (EitherLeft<L> lhs, EitherLeft<L> rhs) Source #

operator | (EitherRight<L> lhs, EitherLeft<L> rhs) Source #

operator | (EitherLeft<L> lhs, EitherRight<L> rhs) Source #

operator true (EitherLeft<L> value) Source #

operator false (EitherLeft<L> value) Source #

struct EitherRight <R> Source #

Fields

field R Value Source #

Properties

property bool IsRight Source #

property bool IsLeft Source #

Methods

method void GetObjectData (SerializationInfo info, StreamingContext context) Source #

method EitherRight<B> Select <B> (Func<R, B> f) Source #

method EitherRight<B> SelectMany <B> (Func<R, EitherRight<B>> f) Source #

method Either<L, B> SelectMany <L, B> (Func<R, EitherLeft<L>> f) Source #

method EitherRight<C> SelectMany <B, C> (Func<R, EitherRight<B>> bind, Func<R, B, C> project) Source #

method Either<L, C> SelectMany <L, C> (Func<R, EitherLeft<L>> bind, Func<R, Unit, C> project) Source #

method Either<L, B> SelectMany <L, B> (Func<R, Either<L, B>> f) Source #

method Either<L, C> SelectMany <L, B, C> (Func<R, Either<L, B>> bind, Func<R, B, C> project) Source #

method string ToString () Source #

method int GetHashCode () Source #

method bool Equals (object obj) Source #

method Lst<R> ToList () Source #

method Arr<R> ToArray () Source #

method Seq<R> ToSeq () Source #

method IEnumerable<R> AsEnumerable () Source #

method Option<R> ToOption () Source #

method TryOption<R> ToTryOption () Source #

method int CompareTo (EitherRight<R> other) Source #

method int CompareTo (R other) Source #

method bool Equals (R other) Source #

method bool Equals (EitherRight<R> other) Source #

method Type GetUnderlyingType () Source #

method int Count () Source #

method Unit Iter (Action<R> Right) Source #

method bool ForAll (Func<R, bool> Right) Source #

method S Fold <S> (S state, Func<S, R, S> Right) Source #

method bool Exists (Func<R, bool> pred) Source #

method EitherRight<Ret> Map <Ret> (Func<R, Ret> mapper) Source #

method EitherRight<Ret> Bind <Ret> (Func<R, EitherRight<Ret>> f) Source #

method Either<L, R> Bind <L> () Source #

method Either<L, R> Bind <L> (Func<R, EitherLeft<L>> f) Source #

method Either<L, B> Bind <L, B> (Func<R, Either<L, B>> f) Source #

method EitherUnsafe<L, B> Bind <L, B> (Func<R, EitherUnsafe<L, B>> f) Source #

method TResult MatchUntyped <TResult> (Func<object, TResult> Right, Func<object, TResult> Left) Source #

Operators

operator < (EitherRight<R> lhs, EitherRight<R> rhs) Source #

operator <= (EitherRight<R> lhs, EitherRight<R> rhs) Source #

operator > (EitherRight<R> lhs, EitherRight<R> rhs) Source #

operator >= (EitherRight<R> lhs, EitherRight<R> rhs) Source #

operator == (EitherRight<R> lhs, EitherRight<R> rhs) Source #

operator != (EitherRight<R> lhs, EitherRight<R> rhs) Source #

operator | (EitherRight<R> lhs, EitherRight<R> rhs) Source #

operator | (EitherRight<R> lhs, EitherLeft<R> rhs) Source #

operator | (EitherLeft<R> lhs, EitherRight<R> rhs) Source #

operator true (EitherRight<R> value) Source #

operator false (EitherRight<R> value) Source #

class EitherRightLeftExt Source #

Methods

method Either<L, C> SelectMany <L, R, B, C> (this Either<L, R> ma, Func<R, EitherRight<B>> bind, Func<R, B, C> project) Source #

method Either<L, C> SelectMany <L, R, C> (this Either<L, R> ma, Func<R, EitherRight<L>> bind, Func<R, Unit, C> project) Source #

method EitherRight<B> Apply <A, B> (this EitherRight<Func<A, B>> mf, EitherRight<A> ma) Source #

method EitherRight<Func<B, C>> Apply <A, B, C> (this EitherRight<Func<A, B, C>> mf, EitherRight<A> ma) Source #

method EitherRight<C> Apply <A, B, C> (this EitherRight<Func<A, B, C>> mf, EitherRight<A> ma, EitherRight<B> mb) Source #

method Either<L, B> Apply <L, A, B> (this EitherRight<Func<A, B>> mf, Either<L, A> ma) Source #

method Either<L, Func<B, C>> Apply <L, A, B, C> (this EitherRight<Func<A, B, C>> mf, Either<L, A> ma) Source #

method Either<L, C> Apply <L, A, B, C> (this EitherRight<Func<A, B, C>> mf, Either<L, A> ma, Either<L, B> mb) Source #

enum EitherStatus Source #

Possible states of an Either

interface IEither Source #

interface IEitherAsync Source #