using System; using System.Linq.Expressions; namespace Abp.Specifications { /// /// Represents the combined specification which indicates that either of the given /// specification should be satisfied by the given object. /// /// The type of the object to which the specification is applied. public class OrSpecification : CompositeSpecification { /// /// Initializes a new instance of class. /// /// The first specification. /// The second specification. public OrSpecification(ISpecification left, ISpecification right) : base(left, right) { } /// /// Gets the LINQ expression which represents the current specification. /// /// The LINQ expression. public override Expression> ToExpression() { return Left.ToExpression().Or(Right.ToExpression()); } } }