Class IsNotInExclusiveRangeValidator<T, TResult>
- Namespace
- LfrlAnvil.Validation.Validators
- Assembly
- LfrlAnvil.Validation.dll
Represents a generic object validator that expects objects to not be in a specified exclusive range.
public sealed class IsNotInExclusiveRangeValidator<T, TResult> : IValidator<T, TResult>
Type Parameters
TObject type.
TResultResult type.
- Inheritance
-
IsNotInExclusiveRangeValidator<T, TResult>
- Implements
-
IValidator<T, TResult>
- Inherited Members
- Extension Methods
Constructors
IsNotInExclusiveRangeValidator(T, T, IComparer<T>, TResult)
Creates a new IsNotInExclusiveRangeValidator<T, TResult> instance.
public IsNotInExclusiveRangeValidator(T min, T max, IComparer<T> comparer, TResult failureResult)
Parameters
minTMinimum exclusive value to compare with.
maxTMaximum exclusive value to compare with.
comparerIComparer<T>Value comparer.
failureResultTResultFailure result.
Exceptions
- ArgumentOutOfRangeException
When
minis greater thanmax.
Properties
Comparer
Value comparer.
public IComparer<T> Comparer { get; }
Property Value
- IComparer<T>
FailureResult
Failure result.
public TResult FailureResult { get; }
Property Value
- TResult
Max
Maximum exclusive value to compare with.
public T Max { get; }
Property Value
- T
Min
Minimum exclusive value to compare with.
public T Min { get; }
Property Value
- T
Methods
Validate(T)
Validates the provided obj.
[Pure]
public Chain<TResult> Validate(T obj)
Parameters
objTObject to validate.
Returns
- Chain<TResult>
Result of
objvalidation.