Table of Contents

Class Pair

Namespace
LfrlAnvil
Assembly
LfrlAnvil.Core.dll

Creates instances of Pair<T1, T2> type.

public static class Pair
Inheritance
Pair
Inherited Members

Methods

Create<T1, T2>(T1, T2)

Creates a new Pair<T1, T2> instance.

[Pure]
public static Pair<T1, T2> Create<T1, T2>(T1 first, T2 second)

Parameters

first T1

First item.

second T2

Second item.

Returns

Pair<T1, T2>

New Pair<T1, T2> instance.

Type Parameters

T1

First item type.

T2

Second item type.

GetUnderlyingFirstType(Type?)

Attempts to extract the underlying first item type from the provided Pair<T1, T2>type.

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

Parameters

type Type

Type to extract the underlying type from.

Returns

Type

Underlying Pair<T1, T2> first item type or null when the provided type is not related to the Pair<T1, T2> type.

GetUnderlyingSecondType(Type?)

Attempts to extract the underlying second item type from the provided Pair<T1, T2>type.

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

Parameters

type Type

Type to extract the underlying type from.

Returns

Type

Underlying Pair<T1, T2> second item type or null when the provided type is not related to the Pair<T1, T2> type.

GetUnderlyingTypes(Type?)

Attempts to extract underlying types from the provided Pair<T1, T2>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 Pair<T1, T2> type.