Table of Contents

Class IsLessThanValidator<T, TResult>

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

Represents a generic object validator that expects objects to be less than a specific value.

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

Type Parameters

T

Object type.

TResult

Result type.

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

Constructors

IsLessThanValidator(T, IComparer<T>, TResult)

Creates a new IsLessThanValidator<T, TResult> instance.

public IsLessThanValidator(T determinant, IComparer<T> comparer, TResult failureResult)

Parameters

determinant T

Value to compare with.

comparer IComparer<T>

Value comparer.

failureResult TResult

Failure result.

Properties

Comparer

Value comparer.

public IComparer<T> Comparer { get; }

Property Value

IComparer<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.