Specification.

ExclusiveBetween<T, TProperty>(Expression<Func<T, TProperty>>, TProperty, TProperty, IComparer<TProperty>) Method

Summary

Creates ExclusiveBetweenSpecification<T> for candidate property:

Checks if candidate property is between (exclusive) min and max value.

Namespace
FluentSpecification
Containing Type
Specification

Syntax

[PublicAPI]
[NotNull]
public static IComplexSpecification<T> ExclusiveBetween<T, TProperty>(Expression<Func<T, TProperty>> selector, TProperty from, TProperty to, IComparer<TProperty> comparer = null)

Attributes

Type Description
PublicAPI
NotNull

Type Parameters

Name Description
T Type of candidate.
TProperty Type of compared objects.

Parameters

Name Type Description
selector Expression<Func<T, TProperty>> Candidate property selector.
from TProperty Min candidate value.
to TProperty Max candidate value.
comparer IComparer<TProperty> Comparer.

Return Value

Type Description
IComplexSpecification<T> New complex Specification.

Exceptions

Type Description
System.ArgumentNullException Thrown when selector is null.
System.ArgumentException Thrown when selector is not valid.
System.ArgumentException Thrown when TProperty has no valid comparison methods.
System.ArgumentException Thrown when from is greater than to.
GitHub