Class Either
- Namespace
- LfrlAnvil.Functional
- Assembly
- LfrlAnvil.Functional.dll
Contains static methods related to Either<T1, T2> type.
public static class Either
- Inheritance
-
Either
- Inherited Members
Methods
GetUnderlyingFirstType(Type?)
Attempts to extract the underlying first value type from the provided Either<T1, T2>type
.
[Pure]
public static Type? GetUnderlyingFirstType(Type? type)
Parameters
type
TypeType to extract the underlying type from.
Returns
- Type
Underlying Either<T1, T2> first value type or null when the provided
type
is not related to the Either<T1, T2> type.
GetUnderlyingSecondType(Type?)
Attempts to extract the underlying second value type from the provided Either<T1, T2>type
.
[Pure]
public static Type? GetUnderlyingSecondType(Type? type)
Parameters
type
TypeType to extract the underlying type from.
Returns
- Type
Underlying Either<T1, T2> second value type or null when the provided
type
is not related to the Either<T1, T2> type.
GetUnderlyingTypes(Type?)
Attempts to extract underlying types from the provided Either<T1, T2>type
.
[Pure]
public static Pair<Type, Type>? GetUnderlyingTypes(Type? type)
Parameters
type
TypeType to extract underlying types from.
Returns
- Pair<Type, Type>?
Pair<T1, T2> of underlying types or null when the provided
type
is not related to the Either<T1, T2> type.