private bool? LessThanOrEqual(FilterContext context, IFilterTarget target, ContentFilterElement element)
{
FilterOperand[] operands = GetOperands(element, 2);
object lhs = GetValue(context, operands[0], target);
object rhs = GetValue(context, operands[1], target);
DoImplicitConversion(ref lhs, ref rhs);
if (lhs is IComparable && rhs is IComparable)
{
return ((IComparable)lhs).CompareTo(rhs) <= 0;
}
// return null if the types are not comparable.
return null;
}