Remove parameters from evaluation

Topics: Help
Jul 7, 2014 at 3:28 PM
Edited Jul 7, 2014 at 3:29 PM
Hi there,
we evaluate parametrized expressions using this amazing framework and it works fine. We calculate each parameter separately because it would be plain values or custom functions (which are solved by our framework).

Now, we want to remove some of these parameters from the evaluation process, because this parameters would regard to disable field values. There is a property called "HasResult" which we are using like this, hoping that this parameter will be ignored during the evaluation;
public bool EvaluateBool()
{
    FExpression.EvaluateParameter += FExpression_EvaluateParameter;
... }
private void FExpression_EvaluateParameter(string name, ParameterArgs args) {
    var field = FSession.CurrentFields[name];
    if(field.Enabled)
        args.Result = field.ValueString;
    else
        args.HasResult = false;
...}
Unfortunately this code snippet crashes if we set "HasResult" to "false". Is there anyway to remove single parameter from expression automatically (meaning, without extra expression treatment)?

Thanks in advanced,
Robert.