Specification.

ForProperty<T, TProperty>(ICompositeSpecification<T>, Expression<Func<T, TProperty>>, ISpecification<TProperty>) Method

Summary

Composes self Specification with PropertySpecification<T, TProperty>:

Verifies if Specification is satisfied by candidate property value.

Namespace
FluentSpecification
Containing Type
Specification

Syntax

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

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.
specification ISpecification<TProperty> Specification to verify value of candidate property.

Return Value

Type Description
IComplexSpecification<T> Composed complex Specification.

Exceptions

Type Description
System.ArgumentNullException Thrown when self is null.
GitHub