99
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
|
||||
using System;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace MyCode.Project.Infrastructure
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the specification that can be satisfied by the given object
|
||||
/// in any circumstance.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the object to which the specification is applied.</typeparam>
|
||||
public sealed class AnySpecification<T> : Specification<T>
|
||||
{
|
||||
#region Public Methods
|
||||
/// <summary>
|
||||
/// Gets the LINQ expression which represents the current specification.
|
||||
/// </summary>
|
||||
/// <returns>The LINQ expression.</returns>
|
||||
public override Expression<Func<T, bool>> GetExpression()
|
||||
{
|
||||
return o => true;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user