Show / Hide Table of Contents

Class Specification<T>

Represents a buisness rule.

Inheritance
Object
Specification<T>
RequiredClaimSpecification
Inherited Members
System.Object.ToString()
Object.Equals(Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
Namespace: IRM.Domain
Assembly: IRM.dll
Syntax
public class Specification<T>
Type Parameters
T

The type of object for which the business rule can be checked.

Constructors

Specification()

Initializes a new instance of the Specification<T> class.

Declaration
protected Specification()
Remarks

It is required for the deriving class to override all properties and funtions when using this constructor.

Specification(Expression<Func<T, Boolean>>)

Initializes a new instance of the Specification<T> class.

Declaration
public Specification(Expression<Func<T, bool>> predicate)
Parameters
Expression<System.Func<T, Boolean>> predicate

Properties

ExpressionPredicate

Declaration
public virtual Expression<Func<T, bool>> ExpressionPredicate { get; }
Property Value
Expression<System.Func<T, Boolean>>

IsSatisfied

Declaration
public virtual Func<T, bool> IsSatisfied { get; }
Property Value
System.Func<T, Boolean>

Methods

IsSatisfiedBy(T)

Gets if an entity fullfills the business rule.

Declaration
public virtual bool IsSatisfiedBy(T entity)
Parameters
T entity

The entity to check for fullfillness.

Returns
Boolean

true if the entity fullfills the business rule; otherwise false.

Operators

BitwiseAnd(Specification<T>, Specification<T>)

Declaration
public static Specification<T> operator &(Specification<T> leftSide, Specification<T> rightSide)
Parameters
Specification<T> leftSide

Specification<T> rightSide

Returns
Specification<T>

BitwiseOr(Specification<T>, Specification<T>)

Declaration
public static Specification<T> operator |(Specification<T> leftSide, Specification<T> rightSide)
Parameters
Specification<T> leftSide

Specification<T> rightSide

Returns
Specification<T>

LogicalNot(Specification<T>)

Declaration
public static Specification<T> operator !(Specification<T> specification)
Parameters
Specification<T> specification

Returns
Specification<T>

Extension Methods

ObjectExtensions.DeepClone<T>(T)
AnnotationsExtensions.IsValid(Object)
Back to top Generated by DocFX