using System; using System.Linq.Expressions; namespace Abp.Specifications { /// /// Represents that the implemented classes are specifications. For more /// information about the specification pattern, please refer to /// http://martinfowler.com/apsupp/spec.pdf. /// /// The type of the object to which the specification is applied. public interface ISpecification { /// /// Returns a value which indicates whether the specification /// is satisfied by the given object. /// /// The object to which the specification is applied. /// True if the specification is satisfied, otherwise false. bool IsSatisfiedBy(T obj); /// /// Gets the LINQ expression which represents the current specification. /// /// The LINQ expression. Expression> ToExpression(); } }