Summary
Base implementation of
Specification executed for collection elements
- Namespace
- FluentSpecification
.Common .Abstractions - Interfaces
- Base Types
-
- object
- Derived Types
graph BT
Type-->Base0["object"]
Type-.->Interface0["IComplexSpecification<T>"]
Type-.->Interface1["IValidationSpecification<T>"]
Type-.->Interface2["ILinqSpecification<T>"]
Type-.->Interface3["ILinqSpecification"]
click Interface3 "/FluentSpecification/api/FluentSpecification.Abstractions/ILinqSpecification"
Type-.->Interface4["ISpecification<T>"]
Type-.->Interface5["ISpecification"]
click Interface5 "/FluentSpecification/api/FluentSpecification.Abstractions/ISpecification"
Type["BaseCollectionSpecification<T, TType>"]
class Type type-node
Derived0["AllSpecification<T, TType>"]-->Type
click Derived0 "/FluentSpecification/api/FluentSpecification.Common/AllSpecification_2"
Derived1["AnySpecification<T, TType>"]-->Type
click Derived1 "/FluentSpecification/api/FluentSpecification.Common/AnySpecification_2"
Syntax
[PublicAPI]
public abstract class BaseCollectionSpecification<T, TType> : IComplexSpecification<T>,
IValidationSpecification<T>, ILinqSpecification<T>, ILinqSpecification, ISpecification<T>,
ISpecification
where T : IEnumerable<TType>
Examples
Attributes
| Type | Description |
|---|---|
| PublicAPI |
Type Parameters
| Name | Description |
|---|---|
| T | Collection type to iterate (System.Collections.Generic.IEnumerable`1). |
| TType | Type of collection element to verify. |
Constructors
| Name | Summary |
|---|---|
| Base |
Creates Specification for candidate (collection) elements.
|
Properties
| Name | Value | Summary |
|---|---|---|
| Collection |
MethodInfo |
Method to call on candidate (collection) with
CollectionElementSpecification.
|
| Collection |
I |
Specification executed for collection element.
|
| OverallForEmpty | bool |
Overall result for empty candidate (collection).
|
| TraceConnector | string |
String connector for elements trace.
|
Methods
| Name | Value | Summary |
|---|---|---|
| CanContinue |
bool |
Checks if flow can be continued after each element result.
|
| CreateFailedMessage |
string |
Gets validation failed message of whole
Specification.
|
| Create |
IEnumerable |
Changes error in each element od candidate.
|
| CreateTraceMessage |
string |
Creates trace message based on overall result and candidate content.
|
| GetExpression |
Expression |
Combines
Expression from TType Specification for
all candidate elements.
|
| GetParameters |
IReadOnlyDictionary |
Get
Specification internal/external parameters, used for candidate verification.
|
| IsSatisfiedBy |
bool |
Checks if
Specification is satisfied by candidate object.
|
| IsSatisfiedBy |
bool |
Checks if
Specification is satisfied by candidate elements.
Elements are verified by TType Specification.
Returns validation result no matter is satisfied or not.
|
Operators
Extension Methods
| Name | Value | Summary |
|---|---|---|
| And |
I |
Creates logical AND
Specification with newly created TSpecification.
From SpecificationCore
|
| And |
I |
Creates composite
Specification proxy for final logical AND Specification.
From SpecificationCore
|
| And |
I |
Creates logical AND
Specification.
From SpecificationCore
|
| AndNot |
I |
Creates logical AND
Specification with newly created and negated TSpecification.
From SpecificationCore
|
| AndNot |
I |
Creates composite
Specification proxy for final logical AND Specification.
Second Specification is negated.
From SpecificationCore
|
| AndNot |
I |
Creates logical AND
Specification with negated other.
From SpecificationCore
|
| As |
I |
Converts
Specification to complex Specification.
From SpecificationCore
|
| AsExpression |
Expression |
Converts
Specification to Linq Expression<T>.
From SpecificationCore
|
| AsPredicate |
Func |
Converts
Specification to Func<T, TResult> predicate.
From SpecificationCore
|
| Not |
I |
Creates logical NOT
Specification.
From SpecificationCore
|
| Or |
I |
Creates logical OR
Specification with newly created TSpecification.
From SpecificationCore
|
| Or |
I |
Creates composite
Specification proxy for final logical OR Specification.
From SpecificationCore
|
| Or |
I |
Creates logical OR
Specification.
From SpecificationCore
|
| OrNot |
I |
Creates logical OR
Specification with newly created and negated TSpecification.
From SpecificationCore
|
| OrNot |
I |
Creates composite
Specification proxy for final logical OR Specification.
Second Specification is negated.
From SpecificationCore
|
| OrNot |
I |
Creates logical OR
Specification with negated other.
From SpecificationCore
|
| WithMessage |
I |
Creates validation
Specification proxy with specific error message factory where not satisfied by.
From SpecificationCore
|
| WithMessage |
I |
Creates validation
Specification proxy with specific error message factory where not satisfied by.
From SpecificationCore
|
| WithMessage |
I |
Creates validation
Specification proxy with specific error message where not satisfied by.
From SpecificationCore
|

