Class Specification<TEntity>
Abstraction on ISpecification that supplies And, Or and Not.
Inheritance
System.Object
Specification<TEntity>
Implements
ISpecification<TEntity>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: JK.Common.Patterns.Specification
Assembly: JK.Common.dll
Syntax
public abstract class Specification<TEntity> : ISpecification<TEntity>
Type Parameters
Name | Description |
---|---|
TEntity | The type of entity. |
Methods
| Improve this Doc View SourceAnd(ISpecification<TEntity>)
Ands the specified specification.
Declaration
public ISpecification<TEntity> And(ISpecification<TEntity> specification)
Parameters
Type | Name | Description |
---|---|---|
ISpecification<TEntity> | specification | The specification |
Returns
Type | Description |
---|---|
ISpecification<TEntity> | Returns a new specification of type And. |
IsSatisfiedBy(in TEntity)
Determines whether the specified candidate is satisfied by TEntity.
Declaration
public abstract bool IsSatisfiedBy(in TEntity candidate)
Parameters
Type | Name | Description |
---|---|---|
TEntity | candidate | The candidate. |
Returns
Type | Description |
---|---|
System.Boolean | True if is satisfied by the specified candidate; otherwise false. |
Not()
Performs the 'not' operators on this instance.
Declaration
public ISpecification<TEntity> Not()
Returns
Type | Description |
---|---|
ISpecification<TEntity> | Returns a new specification of type Not. |
Or(ISpecification<TEntity>)
Performs the 'or' operator on the specified specification.
Declaration
public ISpecification<TEntity> Or(ISpecification<TEntity> specification)
Parameters
Type | Name | Description |
---|---|---|
ISpecification<TEntity> | specification | The specification. |
Returns
Type | Description |
---|---|
ISpecification<TEntity> | Returns a new specification of type Or. |