using System;
using System.Linq.Expressions;
namespace MyCode.Project.Infrastructure
{
///
/// Represents the specification which is represented by the corresponding
/// LINQ expression.
///
/// The type of the object to which the specification is applied.
internal sealed class ExpressionSpecification : Specification
{
#region Private Fields
private Expression> expression;
#endregion
#region Ctor
///
/// Initializes a new instance of ExpressionSpecification<T> class.
///
/// The LINQ expression which represents the current
/// specification.
public ExpressionSpecification(Expression> expression)
{
this.expression = expression;
}
#endregion
#region Public Methods
///
/// Gets the LINQ expression which represents the current specification.
///
/// The LINQ expression.
public override Expression> GetExpression()
{
return this.expression;
}
#endregion
}
}