Class ResultEqualityComparer<T>
- Namespace
- Rascal
- Assembly
- Rascal.dll
A IEqualityComparer<T> which compares equality between Result<T> values.
public sealed class ResultEqualityComparer<T> : IEqualityComparer<Result<T>>
Type Parameters
T
The type of an ok value of a result.
- Inheritance
-
ResultEqualityComparer<T>
- Implements
- Inherited Members
- Extension Methods
Constructors
ResultEqualityComparer(IEqualityComparer<T>)
A IEqualityComparer<T> which compares equality between Result<T> values.
public ResultEqualityComparer(IEqualityComparer<T> valueComparer)
Parameters
valueComparer
IEqualityComparer<T>The equality comparer used to compare ok values of results.
Properties
Default
A ResultEqualityComparer<T> which uses Default to compare ok values.
public static ResultEqualityComparer<T> Default { get; }
Property Value
- ResultEqualityComparer<T>
- A which compares equality between values.
Methods
Equals(Result<T>, Result<T>)
public bool Equals(Result<T> x, Result<T> y)
Parameters
x
Result<T>- A which compares equality between values.
y
Result<T>- A which compares equality between values.
Returns
- bool
- A which compares equality between values.
GetHashCode(Result<T>)
public int GetHashCode(Result<T> obj)
Parameters
obj
Result<T>- A which compares equality between values.
Returns
- int
- A which compares equality between values.