protected override object EvaluationInternal(IDictionary <object, object> parameters) { var operand = Operand.Evaluation(parameters); if (operand == null) { return(null); } if (operand == ExpressionConstants.Unevaluatable) { return(ExpressionConstants.Unevaluatable); } var @bool = ExprEvalUtils.Obj2bool(operand); return(@bool ? LiteralBoolean.False : LiteralBoolean.True); }
protected override object EvaluationInternal(IDictionary <object, object> parameters) { var left = LeftOprand.Evaluation(parameters); var right = rightOprand.Evaluation(parameters); if (left == null || right == null) { return(null); } if (left == ExpressionConstants.Unevaluatable || right == ExpressionConstants.Unevaluatable) { return(ExpressionConstants.Unevaluatable); } var b1 = ExprEvalUtils.Obj2bool(left); var b2 = ExprEvalUtils.Obj2bool(right); return(b1 != b2 ? LiteralBoolean.True : LiteralBoolean.False); }
protected override object EvaluationInternal(IDictionary <object, object> parameters) { foreach (var operand in operands) { var val = operand.Evaluation(parameters); if (val == null) { return(null); } if (val == ExpressionConstants.Unevaluatable) { return(ExpressionConstants.Unevaluatable); } if (ExprEvalUtils.Obj2bool(val)) { return(LiteralBoolean.True); } } return(LiteralBoolean.False); }