Specification.

Any<T, TPropertyType>(Expression<Func<T, IEnumerable<TPropertyType>>>, ISpecification<TPropertyType>) Method

Summary

Creates AnySpecification<T, TType> for candidate property:

Checks if ISpecification<T> is satisfied by ANY element in candidate property collection.

Namespace
FluentSpecification
Containing Type
Specification

Syntax

[PublicAPI]
[NotNull]
public static IComplexSpecification<T> Any<T, TPropertyType>(Expression<Func<T, IEnumerable<TPropertyType>>> selector, ISpecification<TPropertyType> anySpecification)

Attributes

Type Description
PublicAPI
NotNull

Type Parameters

Name Description
T Type of candidate.
TPropertyType Type of collection element to verify.

Parameters

Name Type Description
selector Expression<Func<T, IEnumerable<TPropertyType>>> Candidate property selector.
anySpecification ISpecification<TPropertyType> Specification for candidate property one element.

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