Table of Contents

Class IsNotEqualToValidator<T, TResult>

Namespace
LfrlAnvil.Validation.Validators
Assembly
LfrlAnvil.Validation.dll

Represents a generic object validator that expects objects to not be equal to a specific value.

public sealed class IsNotEqualToValidator<T, TResult> : IValidator<T, TResult>

Type Parameters

T

Object type.

TResult

Result type.

Inheritance
IsNotEqualToValidator<T, TResult>
Implements
IValidator<T, TResult>
Inherited Members
Extension Methods

Constructors

IsNotEqualToValidator(T, IEqualityComparer<T>, TResult)

Creates a new IsNotEqualToValidator<T, TResult> instance.

public IsNotEqualToValidator(T determinant, IEqualityComparer<T> comparer, TResult failureResult)

Parameters

determinant T

Value to compare with.

comparer IEqualityComparer<T>

Value equality comparer.

failureResult TResult

Failure result.

Properties

Comparer

Value equality comparer.

public IEqualityComparer<T> Comparer { get; }

Property Value

IEqualityComparer<T>

Determinant

Value to compare with.

public T Determinant { get; }

Property Value

T

FailureResult

Failure result.

public TResult FailureResult { get; }

Property Value

TResult

Methods

Validate(T)

Validates the provided obj.

[Pure]
public Chain<TResult> Validate(T obj)

Parameters

obj T

Object to validate.

Returns

Chain<TResult>

Result of obj validation.