Specification.

InclusiveBetween<T>(ICompositeSpecification<T>, T, T, IComparer<T>) Method

Summary

Composes self Specification with InclusiveBetweenSpecification<T>:

Checks if candidate object is between (inclusive) min and max value.

Namespace
FluentSpecification
Containing Type
Specification

Syntax

[PublicAPI]
[NotNull]
public static IComplexSpecification<T> InclusiveBetween<T>(this ICompositeSpecification<T> self, T from, T to, IComparer<T> comparer = null)

Attributes

Type Description
PublicAPI
NotNull

Type Parameters

Name Description
T Type of compared objects.

Parameters

Name Type Description
self ICompositeSpecification<T> Self specification.
from T Min candidate value.
to T Max candidate value.
comparer IComparer<T> Comparer.

Return Value

Type Description
IComplexSpecification<T> Composed complex Specification.

Exceptions

Type Description
System.ArgumentNullException Thrown when self is null.
System.ArgumentException Thrown when from is greater than to.
GitHub