Show / Hide Table of Contents

Class Specification<T>

Represents the base class for specifications.

Inheritance
System.Object
Specification<T>
AnySpecification<T>
CompositeSpecification<T>
ExpressionSpecification<T>
NoneSpecification<T>
NotSpecification<T>
Implements
ISpecification<T>
Namespace: Volo.Abp.Specifications
Assembly: Volo.Abp.Specifications.dll
Syntax
public abstract class Specification<T> : object, 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
public virtual 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
public abstract Expression<Func<T, bool>> ToExpression()
Returns
Type Description
Expression<Func<T, System.Boolean>>

The LINQ expression.

Operators

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

Implicitly converts a specification to expression.

Declaration
public static implicit operator Expression<Func<T, bool>>(Specification<T> specification)
Parameters
Type Name Description
Specification<T> specification
Returns
Type Description
Expression<Func<T, System.Boolean>>

Implements

ISpecification<T>

Extension Methods

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