• API Reference

    Show / Hide Table of Contents
    • Recore
      • AbsoluteUri
      • AsyncAction
      • AsyncAction<T>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8, T9>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7>
      • AsyncAction<T1, T2, T3, T4, T5, T6>
      • AsyncAction<T1, T2, T3, T4, T5>
      • AsyncAction<T1, T2, T3, T4>
      • AsyncAction<T1, T2, T3>
      • AsyncAction<T1, T2>
      • AsyncDefer
      • AsyncFunc<T, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, TResult>
      • AsyncFunc<T1, T2, T3, T4, TResult>
      • AsyncFunc<T1, T2, T3, TResult>
      • AsyncFunc<T1, T2, TResult>
      • AsyncFunc<TResult>
      • Defer
      • Either
      • Either<TLeft, TRight>
      • Func
      • ObjectExtensions
      • Of<T>
      • OfJsonAttribute
      • Optional
      • Optional<T>
      • RelativeUri
      • Result
      • Result.AsyncCatcher<TValue>
      • Result.Catcher<TValue>
      • Result<TValue, TError>
      • Unit
      • UriExtensions
    • Recore.Collections.Generic
      • AnonymousEqualityComparer<T>
      • ICollectionExtensions
      • IDictionaryExtensions
      • IIterator<T>
      • Iterator
      • LinkedListExtensions
      • ListExtensions
      • MappedComparer<T, TMapped>
      • MappedEqualityComparer<T, TMapped>
    • Recore.Linq
      • Renumerable
    • Recore.Security.Cryptography
      • SecureCompare
    • Recore.Text.Json.Serialization.Converters
      • OverrideEitherConverter<TLeft, TRight>
      • OverrideResultConverter<TValue, TError>
    • Recore.Threading.Tasks
      • TaskExtensions

    Class Either

    Provides additional methods for Either<TLeft, TRight>.

    Inheritance
    Object
    Either
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Recore
    Assembly: Recore.dll
    Syntax
    public static class Either

    Methods

    | Improve this Doc View Source

    Collapse<T>(Either<T, T>)

    Retrieves the value of an Either<TLeft, TRight> when TLeft and TRight are the same.

    Declaration
    public static T Collapse<T>(this Either<T, T> either)
    Parameters
    Type Name Description
    Either<T, T> either
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Lefts<TLeft, TRight>(IEnumerable<Either<TLeft, TRight>>)

    Collects all the left-side values from the sequence.

    Declaration
    public static IEnumerable<TLeft> Lefts<TLeft, TRight>(this IEnumerable<Either<TLeft, TRight>> source)
    Parameters
    Type Name Description
    IEnumerable<Either<TLeft, TRight>> source
    Returns
    Type Description
    IEnumerable<TLeft>
    Type Parameters
    Name Description
    TLeft
    TRight
    | Improve this Doc View Source

    Lift<TLeft, TRight>(Action<TLeft>, Action<TRight>)

    Combines two unary actions into a single action taking either of their parameters.

    Declaration
    public static Action<Either<TLeft, TRight>> Lift<TLeft, TRight>(Action<TLeft> leftAction, Action<TRight> rightAction)
    Parameters
    Type Name Description
    Action<TLeft> leftAction
    Action<TRight> rightAction
    Returns
    Type Description
    Action<Either<TLeft, TRight>>
    Type Parameters
    Name Description
    TLeft
    TRight
    | Improve this Doc View Source

    Lift<TLeft, TRight, TResult>(Func<TLeft, TResult>, Func<TRight, TResult>)

    Combines two unary functions with the same return type into a single function taking either of their parameters.

    Declaration
    public static Func<Either<TLeft, TRight>, TResult> Lift<TLeft, TRight, TResult>(Func<TLeft, TResult> leftFunc, Func<TRight, TResult> rightFunc)
    Parameters
    Type Name Description
    Func<TLeft, TResult> leftFunc
    Func<TRight, TResult> rightFunc
    Returns
    Type Description
    Func<Either<TLeft, TRight>, TResult>
    Type Parameters
    Name Description
    TLeft
    TRight
    TResult
    | Improve this Doc View Source

    Rights<TLeft, TRight>(IEnumerable<Either<TLeft, TRight>>)

    Collects all the right-side values from the sequence.

    Declaration
    public static IEnumerable<TRight> Rights<TLeft, TRight>(this IEnumerable<Either<TLeft, TRight>> source)
    Parameters
    Type Name Description
    IEnumerable<Either<TLeft, TRight>> source
    Returns
    Type Description
    IEnumerable<TRight>
    Type Parameters
    Name Description
    TLeft
    TRight
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX