NegatableValidationSpecification<T> Class

Summary

Base implementation of INegatableValidationSpecification<T>. Inherited functionality from ValidationSpecification<T>.
graph BT Type-->Base0["ValidationSpecification<T>"] Base0-->Base1["object"] Type-.->Interface0["IValidationSpecification<T>"] Type-.->Interface1["ISpecification<T>"] Type-.->Interface2["INegatableValidationSpecification<T>"] Type-.->Interface3["INegatableSpecification<T>"] Type-.->Interface4["ISpecification"] click Interface4 "/FluentSpecification/api/FluentSpecification.Abstractions/ISpecification" Type["NegatableValidationSpecification<T>"] class Type type-node Derived0["ComplexSpecification<T>"]-->Type click Derived0 "/FluentSpecification/api/FluentSpecification.Core/ComplexSpecification_1"

Syntax

[PublicAPI]
public abstract class NegatableValidationSpecification<T> : ValidationSpecification<T>, 
    IValidationSpecification<T>, ISpecification<T>, INegatableValidationSpecification<T>, 
    INegatableSpecification<T>, ISpecification

Attributes

Type Description
PublicAPI

Type Parameters

Name Description
T Type of candidate to verify.

Methods

Name Value Summary
CreateNegationFailedMessage(T) string
Gets validation negation failed message of Specification for candidate content.
CreateNegationResult(T, bool) SpecificationResult
Creates SpecificationResult validation object for negation.
CreateNegationTraceMessage(T, bool) string
Creates negation trace message based on overall result and candidate content.
IsNotSatisfiedBy(T) bool
Checks if Specification is NOT satisfied by candidate object.
IsNotSatisfiedBy(T, SpecificationResult) bool
Checks if Specification is NOT satisfied by candidate object. Returns validation result no matter is satisfied or not.

Operators

Name Value Summary
implicit operator Func<T, bool>(ValidationSpecification<T>) Func<T, bool>
Inherited from ValidationSpecification<T>

Extension Methods

Name Value Summary
And<T, TSpecification>() IComplexSpecification<T>
Creates logical AND Specification with newly created TSpecification.
And<T>() ICompositeSpecification<T>
Creates composite Specification proxy for final logical AND Specification.
And<T>(ISpecification<T>) IComplexSpecification<T>
Creates logical AND Specification.
AndNot<T, TSpecification>() IComplexSpecification<T>
Creates logical AND Specification with newly created and negated TSpecification.
AndNot<T>() ICompositeSpecification<T>
Creates composite Specification proxy for final logical AND Specification. Second Specification is negated.
AndNot<T>(ISpecification<T>) IComplexSpecification<T>
Creates logical AND Specification with negated other.
AsComplexSpecification<T>() IComplexSpecification<T>
Converts Specification to complex Specification.
AsExpression<T>() Expression<Func<T, bool>>
Converts Specification to Linq Expression<T>.
AsPredicate<T>() Func<T, bool>
Converts Specification to Func<T, TResult> predicate.
Not<T>() IComplexSpecification<T>
Creates logical NOT Specification.
Or<T, TSpecification>() IComplexSpecification<T>
Creates logical OR Specification with newly created TSpecification.
Or<T>() ICompositeSpecification<T>
Creates composite Specification proxy for final logical OR Specification.
Or<T>(ISpecification<T>) IComplexSpecification<T>
Creates logical OR Specification.
OrNot<T, TSpecification>() IComplexSpecification<T>
Creates logical OR Specification with newly created and negated TSpecification.
OrNot<T>() ICompositeSpecification<T>
Creates composite Specification proxy for final logical OR Specification. Second Specification is negated.
OrNot<T>(ISpecification<T>) IComplexSpecification<T>
Creates logical OR Specification with negated other.
WithMessage<T>(Func<T, IReadOnlyDictionary<string, object>, string>) IComplexSpecification<T>
Creates validation Specification proxy with specific error message factory where not satisfied by.
WithMessage<T>(Func<T, string>) IComplexSpecification<T>
Creates validation Specification proxy with specific error message factory where not satisfied by.
WithMessage<T>(string) IComplexSpecification<T>
Creates validation Specification proxy with specific error message where not satisfied by.
GitHub