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 @@ -928,6 +928,13 @@ public IDictionary<string, object> Variables
928928 }
929929 }
930930
931+ /// <summary>
932+ /// Is fired just before an scriptExpression is evaluate.<para/>
933+ /// Allow to redefine the scriptExpression to evaluate or to force a result value.
934+ /// </summary>
935+ public event EventHandler < ExpressionEvaluationEventArg > ScriptExpressionEvaluating ;
936+
937+
931938 /// <summary>
932939 /// Is fired just before an expression is evaluate.<para/>
933940 /// Allow to redefine the expression to evaluate or to force a result value.
@@ -1085,6 +1092,13 @@ public virtual T ScriptEvaluate<T>(string script)
10851092 public virtual object ScriptEvaluate ( string script )
10861093 {
10871094 inScript = true ;
1095+
1096+ ExpressionEvaluationEventArg expressionEvaluationEventArg = new ExpressionEvaluationEventArg ( script , this ) ;
1097+
1098+ ExpressionEvaluating ? . Invoke ( this , expressionEvaluationEventArg ) ;
1099+
1100+ script = expressionEvaluationEventArg . Expression ;
1101+
10881102 try
10891103 {
10901104 bool isReturn = false ;
You can’t perform that action at this time.
0 commit comments