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
oldValueTOld value.
valueTNew value.
Returns
- Mutation<T>
New Mutation<T> instance.
Type Parameters
TValue type.
GetUnderlyingType(Type?)
Attempts to extract the underlying type from the provided Mutation<T>type.
[Pure]
public static Type? GetUnderlyingType(Type? type)
Parameters
typeTypeType to extract the underlying type from.
Returns
- Type
Underlying Mutation<T> type or null when the provided
typeis not related to the Mutation<T> type.