ICompositeSpecification<T> Interface

Summary

Used for composing Specifications e.g. in fluent API.
graph BT Type["ICompositeSpecification<T>"] class Type type-node

Syntax

[PublicAPI]
public interface ICompositeSpecification<T>

Attributes

Type Description
PublicAPI

Type Parameters

Name Description
T Type of candidate to verify.

Properties

Name Value Summary
BaseSpecification ISpecification<T>
"Left" Specification, ready for compose.

Methods

Name Value Summary
Compose(ISpecification<T>) IComplexSpecification<T>
Compose two separate Specifications (BaseSpecification and other) into one.

Extension Methods

Name Value Summary
All<T, TPropertyType>(Expression<Func<T, IEnumerable<TPropertyType>>>, ISpecification<TPropertyType>) IComplexSpecification<T>

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

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

All<T, TType>(ISpecification<TType>) IComplexSpecification<T>

Composes self Specification with AllSpecification<T, TType>:

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

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

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

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

Any<T, TType>(ISpecification<TType>) IComplexSpecification<T>

Composes self Specification with AnySpecification<T, TType>:

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

Cast<T, TCast>(ISpecification<TCast>) IComplexSpecification<T>

Composes self Specification with CastSpecification<T, TCast>:

Converts Specification (candidate to verification) from T to TCast.

Cast<T, TProperty, TCast>(Expression<Func<T, TProperty>>, ISpecification<TCast>) IComplexSpecification<T>

Composes self Specification with CastSpecification<T, TCast> for candidate property:

Converts Specification (candidate property to verification) from TProperty to TCast.

Contains<T, TPropertyType>(Expression<Func<T, IEnumerable<TPropertyType>>>, TPropertyType, IEqualityComparer<TPropertyType>) IComplexSpecification<T>

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

Checks if candidate property contains expected element.

Contains<T, TType>(TType, IEqualityComparer<TType>) IComplexSpecification<T>

Composes self Specification with ContainsSpecification<T, TType>:

Checks if candidate contains expected element.

Contains<T>(Expression<Func<T, string>>, string) IComplexSpecification<T>

Composes self Specification with ContainsSpecification for candidate property:

Checks if string contains another string (case sensitive).

CreditCard<T>(Expression<Func<T, string>>) IComplexSpecification<T>

Composes self Specification with CreditCardSpecification for candidate property:

Checks if string is valid credit card number.

Email<T>(Expression<Func<T, string>>) IComplexSpecification<T>

Composes self Specification with EmailSpecification for candidate property:

Checks if string is valid email address.

Empty<T, TProperty>(Expression<Func<T, TProperty>>) IComplexSpecification<T>

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

Checks if candidate property is empty.

Empty<T>() IComplexSpecification<T>

Composes self Specification with EmptySpecification<T>:

Checks if candidate is empty.

Equal<T, TProperty>(Expression<Func<T, TProperty>>, TProperty, IEqualityComparer<TProperty>) IComplexSpecification<T>

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

Checks if candidate property is equal to expected object.

Equal<T>(T, IEqualityComparer<T>) IComplexSpecification<T>

Composes self Specification with EqualSpecification<T>:

Checks if candidate object is equal to expected object.

ExclusiveBetween<T, TProperty>(Expression<Func<T, TProperty>>, TProperty, TProperty, IComparer<TProperty>) IComplexSpecification<T>

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

Checks if candidate property is between (exclusive) min and max value.

ExclusiveBetween<T>(T, T, IComparer<T>) IComplexSpecification<T>

Composes self Specification with ExclusiveBetweenSpecification<T>:

Checks if candidate object is between (exclusive) min and max value.

Expression<T, TProperty>(Expression<Func<T, TProperty>>, Expression<Func<TProperty, bool>>) IComplexSpecification<T>

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

Checks if external Linq Expression is satisfied by candidate property.

Expression<T>(Expression<Func<T, bool>>) IComplexSpecification<T>

Composes self Specification with ExpressionSpecification<T>:

Checks if external Linq Expression is satisfied by candidate.

False<T>(Expression<Func<T, bool>>) IComplexSpecification<T>

Composes self Specification with FalseSpecification for candidate property:

Checks if candidate property is False.

ForProperty<T, TProperty>(Expression<Func<T, TProperty>>, ISpecification<TProperty>) IComplexSpecification<T>

Composes self Specification with PropertySpecification<T, TProperty>:

Verifies if Specification is satisfied by candidate property value.

GreaterThan<T, TProperty>(Expression<Func<T, TProperty>>, TProperty, IComparer<TProperty>) IComplexSpecification<T>

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

Checks if candidate property is greater than expected value.

GreaterThan<T>(T, IComparer<T>) IComplexSpecification<T>

Composes self Specification with GreaterThanSpecification<T>:

Checks if candidate object is greater than expected value.

GreaterThanOrEqual<T, TProperty>(Expression<Func<T, TProperty>>, TProperty, IComparer<TProperty>) IComplexSpecification<T>

Composes self Specification with GreaterThanOrEqualSpecification<T> candidate property:

Checks if candidate property is greater than or equal to expected value.

GreaterThanOrEqual<T>(T, IComparer<T>) IComplexSpecification<T>

Composes self Specification with GreaterThanOrEqualSpecification<T>:

Checks if candidate object is greater than or equal to expected value.

InclusiveBetween<T, TProperty>(Expression<Func<T, TProperty>>, TProperty, TProperty, IComparer<TProperty>) IComplexSpecification<T>

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

Checks if candidate property is between (inclusive) min and max value.

InclusiveBetween<T>(T, T, IComparer<T>) IComplexSpecification<T>

Composes self Specification with InclusiveBetweenSpecification<T>:

Checks if candidate object is between (inclusive) min and max value.

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

Composes self Specification with IsTypeSpecification<T> negation for candidate property:

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

IsNotType<T>(Type) IComplexSpecification<T>

Composes self Specification with IsTypeSpecification<T> negation:

Checks if candidate is not compatible with a given type.

IsType<T, TProperty>(Expression<Func<T, TProperty>>, Type) IComplexSpecification<T>

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

Checks if candidate property is compatible with a given type.

IsType<T>(Type) IComplexSpecification<T>

Composes self Specification with IsTypeSpecification<T>:

Checks if candidate is compatible with a given type.

Length<T, TProperty>(Expression<Func<T, TProperty>>, int) IComplexSpecification<T>

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

Checks if length of candidate property is equal to specific value.

LengthBetween<T, TProperty>(Expression<Func<T, TProperty>>, int, int) IComplexSpecification<T>

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

Checks if length of candidate property is between Min and Max values.

LessThan<T, TProperty>(Expression<Func<T, TProperty>>, TProperty, IComparer<TProperty>) IComplexSpecification<T>

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

Checks if candidate property is lower than expected value.

LessThan<T>(T, IComparer<T>) IComplexSpecification<T>

Composes self Specification with LessThanSpecification<T>:

Checks if candidate object is lower than expected value.

LessThanOrEqual<T, TProperty>(Expression<Func<T, TProperty>>, TProperty, IComparer<TProperty>) IComplexSpecification<T>

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

Checks if candidate property is lower than or equal to expected value.

LessThanOrEqual<T>(T, IComparer<T>) IComplexSpecification<T>

Composes self Specification with LessThanOrEqualSpecification<T>:

Checks if candidate object is lower than or equal to expected value.

Match<T>(Expression<Func<T, string>>, string, RegexOptions) IComplexSpecification<T>

Composes self Specification with MatchSpecification for candidate property:

Checks if string candidate property match a given Regex pattern.

MaxLength<T, TProperty>(Expression<Func<T, TProperty>>, int) IComplexSpecification<T>

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

Checks if length of candidate property is lower than or equal to Max value.

MinLength<T, TProperty>(Expression<Func<T, TProperty>>, int) IComplexSpecification<T>

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

Checks if length of candidate property is greater than or equal to Min value.

NotContains<T, TPropertyType>(Expression<Func<T, IEnumerable<TPropertyType>>>, TPropertyType, IEqualityComparer<TPropertyType>) IComplexSpecification<T>

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

Checks if candidate property not contains expected element.

NotContains<T, TType>(TType, IEqualityComparer<TType>) IComplexSpecification<T>

Composes self Specification with ContainsSpecification<T, TType> negation:

Checks if candidate not contains expected element.

NotContains<T>(Expression<Func<T, string>>, string) IComplexSpecification<T>

Composes self Specification with ContainsSpecification negation for candidate property:

Checks if string not contains another string (case sensitive).

NotCreditCard<T>(Expression<Func<T, string>>) IComplexSpecification<T>

Composes self Specification with CreditCardSpecification negation for candidate property:

Checks if string is not valid credit card number.

NotEmail<T>(Expression<Func<T, string>>) IComplexSpecification<T>

Composes self Specification with EmailSpecification negation for candidate property:

Checks if string is not valid email address.

NotEmpty<T, TProperty>(Expression<Func<T, TProperty>>) IComplexSpecification<T>

Composes self Specification with EmptySpecification<T> negation for candidate property:

Checks if candidate property is not empty.

NotEmpty<T>() IComplexSpecification<T>

Composes self Specification with EmptySpecification<T> negation:

Checks if candidate is not empty.

NotEqual<T, TProperty>(Expression<Func<T, TProperty>>, TProperty, IEqualityComparer<TProperty>) IComplexSpecification<T>

Composes self Specification with EqualSpecification<T> negation for candidate property:

Checks if candidate property is not equal to expected object.

NotEqual<T>(T, IEqualityComparer<T>) IComplexSpecification<T>

Composes self Specification with EqualSpecification<T> negation:

Checks if candidate object is not equal to expected object.

NotExclusiveBetween<T, TProperty>(Expression<Func<T, TProperty>>, TProperty, TProperty, IComparer<TProperty>) IComplexSpecification<T>

Composes self Specification with ExclusiveBetweenSpecification<T> negation for candidate property:

Checks if candidate property is not between (exclusive) min and max value.

NotExclusiveBetween<T>(T, T, IComparer<T>) IComplexSpecification<T>

Composes self Specification with ExclusiveBetweenSpecification<T> negation:

Checks if candidate object is not between (exclusive) min and max value.

NotGreaterThan<T, TProperty>(Expression<Func<T, TProperty>>, TProperty, IComparer<TProperty>) IComplexSpecification<T>

Composes self Specification with GreaterThanSpecification<T> negation for candidate property:

Checks if candidate property is not greater than (lower than or equal to) expected value.

NotGreaterThan<T>(T, IComparer<T>) IComplexSpecification<T>

Composes self Specification with GreaterThanSpecification<T> negation:

Checks if candidate object is not greater than (lower than or equal to) expected value.

NotGreaterThanOrEqual<T, TProperty>(Expression<Func<T, TProperty>>, TProperty, IComparer<TProperty>) IComplexSpecification<T>

Composes self Specification with GreaterThanOrEqualSpecification<T> negation for candidate property:

Checks if candidate property is not greater than or equal to (lower than) expected value.

NotGreaterThanOrEqual<T>(T, IComparer<T>) IComplexSpecification<T>

Composes self Specification with GreaterThanOrEqualSpecification<T> negation:

Checks if candidate object is not greater than or equal to (lower than) expected value.

NotInclusiveBetween<T, TProperty>(Expression<Func<T, TProperty>>, TProperty, TProperty, IComparer<TProperty>) IComplexSpecification<T>

Composes self Specification with InclusiveBetweenSpecification<T> negation for candidate property:

Checks if candidate property is not between (inclusive) min and max value.

NotInclusiveBetween<T>(T, T, IComparer<T>) IComplexSpecification<T>

Composes self Specification with InclusiveBetweenSpecification<T> negation:

Checks if candidate object is not between (inclusive) min and max value.

NotLength<T, TProperty>(Expression<Func<T, TProperty>>, int) IComplexSpecification<T>

Composes self Specification with LengthSpecification<T> negation for candidate property:

Checks if length of candidate property is not equal to specific value.

NotLengthBetween<T, TProperty>(Expression<Func<T, TProperty>>, int, int) IComplexSpecification<T>

Composes self Specification with LengthBetweenSpecification<T> negation for candidate property:

Checks if length of candidate property is not between Min and Max values.

NotLessThan<T, TProperty>(Expression<Func<T, TProperty>>, TProperty, IComparer<TProperty>) IComplexSpecification<T>

Composes self Specification with LessThanSpecification<T> negation for candidate property:

Checks if candidate property is not lower than (greater than or equal to) expected value.

NotLessThan<T>(T, IComparer<T>) IComplexSpecification<T>

Composes self Specification with LessThanSpecification<T> negation:

Checks if candidate object is not lower than (greater than or equal to) expected value.

NotLessThanOrEqual<T, TProperty>(Expression<Func<T, TProperty>>, TProperty, IComparer<TProperty>) IComplexSpecification<T>

Composes self Specification with LessThanOrEqualSpecification<T> negation for candidate property:

Checks if candidate property is not lower than or equal to (greater than) expected value.

NotLessThanOrEqual<T>(T, IComparer<T>) IComplexSpecification<T>

Composes self Specification with LessThanOrEqualSpecification<T> negation:

Checks if candidate object is not lower than or equal to (greater than) expected value.

NotMatch<T>(Expression<Func<T, string>>, string, RegexOptions) IComplexSpecification<T>

Composes self Specification with MatchSpecification negation for candidate property:

Checks if string candidate property not match a given Regex pattern.

NotMaxLength<T, TProperty>(Expression<Func<T, TProperty>>, int) IComplexSpecification<T>

Composes self Specification with MaxLengthSpecification<T> negation for candidate property:

Checks if length of candidate property is not lower than or equal to (is greater than) Max value.

NotMinLength<T, TProperty>(Expression<Func<T, TProperty>>, int) IComplexSpecification<T>

Composes self Specification with MinLengthSpecification<T> negation for candidate property:

Checks if length of candidate property is not greater than or equal to (is less than) Min value.

NotNull<T, TProperty>(Expression<Func<T, TProperty>>) IComplexSpecification<T>

Composes self Specification with NullSpecification<T> negation for candidate property:

Checks if candidate property is not null.

NotNull<T>() IComplexSpecification<T>

Composes self Specification with NullSpecification<T> negation:

Checks if candidate is not null.

Null<T, TProperty>(Expression<Func<T, TProperty>>) IComplexSpecification<T>

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

Checks if candidate property is null.

Null<T>() IComplexSpecification<T>

Composes self Specification with NullSpecification<T>:

Checks if candidate is null.

True<T>(Expression<Func<T, bool>>) IComplexSpecification<T>

Composes self Specification with TrueSpecification for candidate property:

Checks if candidate property is True.

GitHub