Пример #1
0
 public TagAttribute(string name, Expression exp)
 {
     this.Name = name;
     this.Expression = exp;
 }
Пример #2
0
 object EvalExpression(Expression exp)
 {
     if (exp is Function)
         return EvalFunction(exp as Function);
     if (exp is IntegerExpression)
         return (exp as IntegerExpression).Value;
     else if (exp is DoubleExpression)
         return (exp as DoubleExpression).Value;
     else if (exp is StringExpression)
         return (exp as StringExpression).Value;
     else if (exp is Field)
         return EvalField(exp as Field);
     else if (exp is Variable)
         return GetVariableValue((exp as Variable).Name);
     else
         return new Exception("未知的表达式类型");
 }
Пример #3
0
 public void Add(Expression exp)
 {
     this.Expressions.Add(exp);
 }
Пример #4
0
 object[] EvalArguments(Expression[] exps)
 {
     object[] args = new object[exps.Length];
     for (int i = 0; i < exps.Length; i++)
         args[i] = EvalExpression(exps[i]);
     return args;
 }