Admittedly I only had a cursory glance at the inner workings of the
code but I was surprised to see that 'AndAlso' was supported for
dynamically composed expressions but 'And' was not. Similarly,
'OrElse' is supported but 'Or' is not.
I thought I would raise it as it seems strange to separate the
function of these operators in the context of NH.Linq.
I located the code in the WhereArgumentsVisitor that I think is
reponsible:
protected override Expression VisitBinary(BinaryExpression expr)
{
switch (expr.NodeType)
{
case ExpressionType.AndAlso:
VisitAndAlsoExpression(expr);
break;
case ExpressionType.OrElse:
VisitOrElseExpression(expr);
break;
default:
VisitBinaryCriterionExpression(expr);
break;
}
return expr;
}
I expected it to be:
protected override Expression VisitBinary(BinaryExpression expr)
{
switch (expr.NodeType)
{
case ExpressionType.And:
case ExpressionType.AndAlso:
VisitAndAlsoExpression(expr);
break;
case ExpressionType.Or:
case ExpressionType.OrElse:
VisitOrElseExpression(expr);
break;
default:
VisitBinaryCriterionExpression(expr);
break;
}
return expr;
}
Is there an explanation for this or was it an oversight?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"NHibernate Contrib - Development Group" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com.ar/group/nhcdevs?hl=en
-~----------~----~----~----~------~----~------~--~---