Specification.

Expression<T, TProperty>(ICompositeSpecification<T>, Expression<Func<T, TProperty>>, Expression<Func<TProperty, bool>>) Method

Summary

Composes self Specification with ExpressionSpecification<T> for candidate property:

Checks if external Linq Expression is satisfied by candidate property.

Namespace
FluentSpecification
Containing Type
Specification

Syntax

[PublicAPI]
[NotNull]
public static IComplexSpecification<T> Expression<T, TProperty>(this ICompositeSpecification<T> self, Expression<Func<T, TProperty>> selector, Expression<Func<TProperty, bool>> expression)

Attributes

Type Description
PublicAPI
NotNull

Type Parameters

Name Description
T Type of candidate.
TProperty Type of candidate property to verify.

Parameters

Name Type Description
self ICompositeSpecification<T> Self specification.
selector Expression<Func<T, TProperty>> Candidate property selector.
expression Expression<Func<TProperty, bool>> External Expression.

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