Table of Contents

Interface IEitherOfEight

Namespace
SodaFlow.Functional
Assembly
SodaFlow.Functional.dll

A non-generic view of an either of eight cases, for code which must handle one with no knowledge of the types of the cases.

[PublicAPI]
public interface IEitherOfEight : IEither
Inherited Members
Extension Methods

Remarks

Each member mirrors one on Either<T1, T2> and its wider siblings, with the held value surfaced as object. Prefer the generic type wherever the types are known: this interface boxes, and loses the type of the value.

Methods

MatchAsyncVoid(Func<object?, Task>, Func<object?, Task>, Func<object?, Task>, Func<object?, Task>, Func<object?, Task>, Func<object?, Task>, Func<object?, Task>, Func<object?, Task>)

Runs one of the eight asynchronous actions depending on which case is held.

MatchAsync<T>(Func<object?, Task<T>>, Func<object?, Task<T>>, Func<object?, Task<T>>, Func<object?, Task<T>>, Func<object?, Task<T>>, Func<object?, Task<T>>, Func<object?, Task<T>>, Func<object?, Task<T>>)

Runs one of the eight asynchronous functions depending on which case is held, and returns its result.

MatchVoid(Action<object?>, Action<object?>, Action<object?>, Action<object?>, Action<object?>, Action<object?>, Action<object?>, Action<object?>)

Runs one of the eight actions depending on which case is held.

Match<T>(Func<object?, T>, Func<object?, T>, Func<object?, T>, Func<object?, T>, Func<object?, T>, Func<object?, T>, Func<object?, T>, Func<object?, T>)

Runs one of the eight functions depending on which case is held, and returns its result.