LessThan() публичный Метод

public LessThan ( HqlExpression lhs, HqlExpression rhs ) : HqlLessThan
lhs HqlExpression
rhs HqlExpression
Результат HqlLessThan
Пример #1
0
 public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection <System.Linq.Expressions.Expression> arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor)
 {
     //return treeBuilder.Constant(0);
     return(treeBuilder.Case(new HqlWhen[] {
         treeBuilder.When(
             treeBuilder.LessThan(visitor.Visit(arguments[0]).AsExpression(), visitor.Visit(arguments[1]).AsExpression()),
             treeBuilder.Constant(-1)),
         treeBuilder.When(
             treeBuilder.GreaterThan(visitor.Visit(arguments[0]).AsExpression(), visitor.Visit(arguments[1]).AsExpression()),
             treeBuilder.Constant(1))
     },
                             treeBuilder.Constant(0)));
 }
 public override HqlTreeNode BuildHql(MethodInfo method, Expression targetObject,
     ReadOnlyCollection<Expression> arguments, HqlTreeBuilder treeBuilder, IHqlExpressionVisitor visitor)
 {
     return treeBuilder.LessThan(visitor.Visit(arguments[0]).AsExpression(), visitor.Visit(arguments[1]).AsExpression());
 }