Table of Contents

Class Chain

Namespace
LfrlAnvil
Assembly
LfrlAnvil.Core.dll

Creates instances of Chain<T> type.

public static class Chain
Inheritance
Chain
Inherited Members

Methods

Create<T>(Chain<T>)

Creates a new Chain<T> instance from another Chain<T> instance.

[Pure]
public static Chain<T> Create<T>(Chain<T> other)

Parameters

other Chain<T>

Chain<T> instance to copy.

Returns

Chain<T>

New Chain<T> instance.

Type Parameters

T

Value type.

Create<T>(IEnumerable<T>)

Creates a new Chain<T> instance from a collection of values.

[Pure]
public static Chain<T> Create<T>(IEnumerable<T> values)

Parameters

values IEnumerable<T>

Collection of values.

Returns

Chain<T>

New Chain<T> instance.

Type Parameters

T

Value type.

Create<T>(T)

Creates a new Chain<T> instance from a single value.

[Pure]
public static Chain<T> Create<T>(T value)

Parameters

value T

Single value.

Returns

Chain<T>

New Chain<T> instance.

Type Parameters

T

Value type.

GetUnderlyingType(Type?)

Attempts to extract the underlying type from the provided Chain<T>type.

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

Parameters

type Type

Type to extract the underlying type from.

Returns

Type

Underlying Chain<T> type or null when the provided type is not related to the Chain<T> type.