File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
CodingSeb.ExpressionEvaluator Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -927,6 +927,13 @@ public IDictionary<string, object> Variables
927927 }
928928 }
929929
930+ /// <summary>
931+ /// Is fired just before an scriptExpression is evaluate.<para/>
932+ /// Allow to redefine the scriptExpression to evaluate or to force a result value.
933+ /// </summary>
934+ public event EventHandler < ExpressionEvaluationEventArg > ScriptExpressionEvaluating ;
935+
936+
930937 /// <summary>
931938 /// Is fired just before an expression is evaluate.<para/>
932939 /// Allow to redefine the expression to evaluate or to force a result value.
@@ -1084,6 +1091,13 @@ public virtual T ScriptEvaluate<T>(string script)
10841091 public virtual object ScriptEvaluate ( string script )
10851092 {
10861093 inScript = true ;
1094+
1095+ ExpressionEvaluationEventArg expressionEvaluationEventArg = new ExpressionEvaluationEventArg ( script , this ) ;
1096+
1097+ ExpressionEvaluating ? . Invoke ( this , expressionEvaluationEventArg ) ;
1098+
1099+ script = expressionEvaluationEventArg . Expression ;
1100+
10871101 try
10881102 {
10891103 bool isReturn = false ;
You can’t perform that action at this time.
0 commit comments