Table of Contents

Class TypeCast

Namespace
LfrlAnvil.Functional
Assembly
LfrlAnvil.Functional.dll

Contains static methods related to TypeCast<TSource, TDestination> type.

public static class TypeCast
Inheritance
TypeCast
Inherited Members

Methods

GetUnderlyingDestinationType(Type?)

Attempts to extract the underlying destination type from the provided TypeCast<TSource, TDestination>type.

[Pure]
public static Type? GetUnderlyingDestinationType(Type? type)

Parameters

type Type

Type to extract the underlying type from.

Returns

Type

Underlying TypeCast<TSource, TDestination> destination type or null when the provided type is not related to the TypeCast<TSource, TDestination> type.

GetUnderlyingSourceType(Type?)

Attempts to extract the underlying source type from the provided TypeCast<TSource, TDestination>type.

[Pure]
public static Type? GetUnderlyingSourceType(Type? type)

Parameters

type Type

Type to extract the underlying type from.

Returns

Type

Underlying TypeCast<TSource, TDestination> source type or null when the provided type is not related to the TypeCast<TSource, TDestination> type.

GetUnderlyingTypes(Type?)

Attempts to extract underlying types from the provided TypeCast<TSource, TDestination>type.

[Pure]
public static Pair<Type, Type>? GetUnderlyingTypes(Type? type)

Parameters

type Type

Type 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 TypeCast<TSource, TDestination> type.