public override void Evaluate(IScriptContext context)
        {
            if (list == null)
            {
                context.Result = true;
                return;
            }

            bool result = true;

            list.Evaluate(context);
            object[] rez = (object[])context.Result;
            foreach (object o in rez)
            {
                try
                {
                    result = result & (bool)o;
                }
                catch
                {
                    throw new ScriptException("Non boolean expression in invariant");
                }
            }

            context.Result = result;
        }
Exemple #2
0
 public override void Evaluate(IScriptContext context)
 {
     if (args == null)
     {
         context.Result = Empty;
         return;
     }
     args.Evaluate(context);
 }
Exemple #3
0
 public override void Evaluate(IScriptContext context)
 {
     if (funcArgs != null)
     {
         funcArgs.Evaluate(context);
         context.Result = (object[])context.Result;
     }
     else
     {
         context.Result = new object[0];
     }
 }
 public override void Evaluate(IScriptContext context)
 {
     exprList.Evaluate(context);
 }