Table of Contents

Class Mutation

Namespace
LfrlAnvil.Functional
Assembly
LfrlAnvil.Functional.dll

Creates instances of Mutation<T> type.

public static class Mutation
Inheritance
Mutation
Inherited Members

Methods

Create<T>(T, T)

Creates a new Mutation<T> instance.

[Pure]
public static Mutation<T> Create<T>(T oldValue, T value)

Parameters

oldValue T

Old value.

value T

New value.

Returns

Mutation<T>

New Mutation<T> instance.

Type Parameters

T

Value type.

GetUnderlyingType(Type?)

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

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

Parameters

type Type

Type to extract the underlying type from.

Returns

Type

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