Specification.

IsNotType<T, TProperty>(Expression<Func<T, TProperty>>, Type) Method

Summary

Creates IsTypeSpecification<T> negation for candidate property:

Checks if candidate property is not compatible with a given type.

Namespace
FluentSpecification
Containing Type
Specification

Syntax

[PublicAPI]
[NotNull]
public static IComplexSpecification<T> IsNotType<T, TProperty>(Expression<Func<T, TProperty>> selector, Type notExpected)

Attributes

Type Description
PublicAPI
NotNull

Type Parameters

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

Parameters

Name Type Description
selector Expression<Func<T, TProperty>> Candidate property selector.
notExpected Type Not expected type of candidate property.

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.
System.ArgumentNullException Thrown when notExpected is null.
GitHub