Method From
- Namespace
- SodaFlow.Functional
- Assembly
- SodaFlow.Functional.dll
From<T1, T2>(Either<T1, T2>)
Collapses an either into the one type that all of its cases derive from.
public T From<T1, T2>(Either<T1, T2> a) where T1 : T where T2 : T
Parameters
aEither<T1, T2>The either to change into one type.
Returns
- T
Whichever value the either holds, typed as
T.
Type Parameters
T1The type of the first case, which must be a
T.T2The type of the second case, which must be a
T.
Remarks
This changes nothing. The constraints guarantee that each case is a
T.
From<T1, T2, T3>(Either<T1, T2, T3>)
Collapses an either into the one type that all of its cases derive from.
public T From<T1, T2, T3>(Either<T1, T2, T3> a) where T1 : T where T2 : T where T3 : T
Parameters
aEither<T1, T2, T3>The either to change into one type.
Returns
- T
Whichever value the either holds, typed as
T.
Type Parameters
T1The type of the first case, which must be a
T.T2The type of the second case, which must be a
T.T3The type of the third case, which must be a
T.
Remarks
This changes nothing. The constraints guarantee that each case is a
T.
From<T1, T2, T3, T4>(Either<T1, T2, T3, T4>)
Collapses an either into the one type that all of its cases derive from.
public T From<T1, T2, T3, T4>(Either<T1, T2, T3, T4> a) where T1 : T where T2 : T where T3 : T where T4 : T
Parameters
aEither<T1, T2, T3, T4>The either to change into one type.
Returns
- T
Whichever value the either holds, typed as
T.
Type Parameters
T1The type of the first case, which must be a
T.T2The type of the second case, which must be a
T.T3The type of the third case, which must be a
T.T4The type of the fourth case, which must be a
T.
Remarks
This changes nothing. The constraints guarantee that each case is a
T.
From<T1, T2, T3, T4, T5>(Either<T1, T2, T3, T4, T5>)
Collapses an either into the one type that all of its cases derive from.
public T From<T1, T2, T3, T4, T5>(Either<T1, T2, T3, T4, T5> a) where T1 : T where T2 : T where T3 : T where T4 : T where T5 : T
Parameters
aEither<T1, T2, T3, T4, T5>The either to change into one type.
Returns
- T
Whichever value the either holds, typed as
T.
Type Parameters
T1The type of the first case, which must be a
T.T2The type of the second case, which must be a
T.T3The type of the third case, which must be a
T.T4The type of the fourth case, which must be a
T.T5The type of the fifth case, which must be a
T.
Remarks
This changes nothing. The constraints guarantee that each case is a
T.
From<T1, T2, T3, T4, T5, T6>(Either<T1, T2, T3, T4, T5, T6>)
Collapses an either into the one type that all of its cases derive from.
public T From<T1, T2, T3, T4, T5, T6>(Either<T1, T2, T3, T4, T5, T6> a) where T1 : T where T2 : T where T3 : T where T4 : T where T5 : T where T6 : T
Parameters
aEither<T1, T2, T3, T4, T5, T6>The either to change into one type.
Returns
- T
Whichever value the either holds, typed as
T.
Type Parameters
T1The type of the first case, which must be a
T.T2The type of the second case, which must be a
T.T3The type of the third case, which must be a
T.T4The type of the fourth case, which must be a
T.T5The type of the fifth case, which must be a
T.T6The type of the sixth case, which must be a
T.
Remarks
This changes nothing. The constraints guarantee that each case is a
T.
From<T1, T2, T3, T4, T5, T6, T7>(Either<T1, T2, T3, T4, T5, T6, T7>)
Collapses an either into the one type that all of its cases derive from.
public T From<T1, T2, T3, T4, T5, T6, T7>(Either<T1, T2, T3, T4, T5, T6, T7> a) where T1 : T where T2 : T where T3 : T where T4 : T where T5 : T where T6 : T where T7 : T
Parameters
aEither<T1, T2, T3, T4, T5, T6, T7>The either to change into one type.
Returns
- T
Whichever value the either holds, typed as
T.
Type Parameters
T1The type of the first case, which must be a
T.T2The type of the second case, which must be a
T.T3The type of the third case, which must be a
T.T4The type of the fourth case, which must be a
T.T5The type of the fifth case, which must be a
T.T6The type of the sixth case, which must be a
T.T7The type of the seventh case, which must be a
T.
Remarks
This changes nothing. The constraints guarantee that each case is a
T.
From<T1, T2, T3, T4, T5, T6, T7, T8>(Either<T1, T2, T3, T4, T5, T6, T7, T8>)
Collapses an either into the one type that all of its cases derive from.
public T From<T1, T2, T3, T4, T5, T6, T7, T8>(Either<T1, T2, T3, T4, T5, T6, T7, T8> a) where T1 : T where T2 : T where T3 : T where T4 : T where T5 : T where T6 : T where T7 : T where T8 : T
Parameters
aEither<T1, T2, T3, T4, T5, T6, T7, T8>The either to change into one type.
Returns
- T
Whichever value the either holds, typed as
T.
Type Parameters
T1The type of the first case, which must be a
T.T2The type of the second case, which must be a
T.T3The type of the third case, which must be a
T.T4The type of the fourth case, which must be a
T.T5The type of the fifth case, which must be a
T.T6The type of the sixth case, which must be a
T.T7The type of the seventh case, which must be a
T.T8The type of the eighth case, which must be a
T.
Remarks
This changes nothing. The constraints guarantee that each case is a
T.