| 12345678910111213141516171819202122 |
- using System;
- using System.Linq.Expressions;
- namespace Abp.Specifications
- {
- /// <summary>
- /// Represents the specification that can be satisfied by the given object
- /// in no circumstance.
- /// </summary>
- /// <typeparam name="T">The type of the object to which the specification is applied.</typeparam>
- public sealed class NoneSpecification<T> : Specification<T>
- {
- /// <summary>
- /// Gets the LINQ expression which represents the current specification.
- /// </summary>
- /// <returns>The LINQ expression.</returns>
- public override Expression<Func<T, bool>> ToExpression()
- {
- return o => false;
- }
- }
- }
|