Specification.

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

Summary

Composes self Specification with AllSpecification<T, TType> for candidate property:

Checks if ISpecification<T> is satisfied by ALL elements in candidate property collection.

Namespace
FluentSpecification
Containing Type
Specification

Syntax

[PublicAPI]
[NotNull]
public static IComplexSpecification<T> All<T, TPropertyType>(this ICompositeSpecification<T> self, Expression<Func<T, IEnumerable<TPropertyType>>> selector, ISpecification<TPropertyType> allSpecification)

Attributes

Type Description
PublicAPI
NotNull

Type Parameters

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

Parameters

Name Type Description
self ICompositeSpecification<T> Self specification.
selector Expression<Func<T, IEnumerable<TPropertyType>>> Candidate property selector.
allSpecification ISpecification<TPropertyType> Specification for candidate property one element.

Return Value

Type Description
IComplexSpecification<T> Composed complex Specification.

Exceptions

Type Description
System.ArgumentNullException Thrown when self or selector is null.
System.ArgumentException Thrown when selector is not valid.
GitHub