public override bool Evaluate(IInternalContextAdapter context)
{
INode left = GetChild(0);
INode right = GetChild(1);
// if either is null, lets log and bail
if (left == null || right == null)
{
rsvc.Error((left == null ? "Left" : "Right") + " side of '&&' operation is null." + " Operation not possible. " +
context.CurrentTemplateName + " [line " + Line + ", column " + Column + "]");
return false;
}
// short circuit the test. Don't eval the RHS if the LHS is false
if (left.Evaluate(context))
if (right.Evaluate(context))
return true;
return false;
}
}