Show / Hide Table of Contents

Interface ISpecification<T>

Represents that the implemented classes are specifications. For more information about the specification pattern, please refer to http://martinfowler.com/apsupp/spec.pdf.

Namespace: Volo.Abp.Specifications
Assembly: Volo.Abp.Specifications.dll
Syntax
public interface ISpecification<T>
Type Parameters
Name Description
T

The type of the object to which the specification is applied.

Methods

IsSatisfiedBy(T)

Returns a value which indicates whether the specification is satisfied by the given object.

Declaration
bool IsSatisfiedBy(T obj)
Parameters
Type Name Description
T obj

The object to which the specification is applied.

Returns
Type Description
System.Boolean

True if the specification is satisfied, otherwise false.

ToExpression()

Gets the LINQ expression which represents the current specification.

Declaration
Expression<Func<T, bool>> ToExpression()
Returns
Type Description
Expression<Func<T, System.Boolean>>

The LINQ expression.

Extension Methods

SpecificationExtensions.And<T>(ISpecification<T>, ISpecification<T>)
SpecificationExtensions.Or<T>(ISpecification<T>, ISpecification<T>)
SpecificationExtensions.AndNot<T>(ISpecification<T>, ISpecification<T>)
SpecificationExtensions.Not<T>(ISpecification<T>)
AbpObjectExtensions.As<T>(Object)
AbpObjectExtensions.To<T>(Object)
AbpObjectExtensions.IsIn<T>(T, T[])
AbpObjectExtensions.If<T>(T, Boolean, Func<T, T>)
AbpObjectExtensions.If<T>(T, Boolean, Action<T>)
LockExtensions.Locking(Object, Action)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<TResult>(Object, Func<TResult>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
Back to top Powered by Volosoft