You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maciej Klemarczyk edited this page Oct 22, 2021
·
3 revisions
Examples
Simple condition example
varexampleExpression="{<, 42, 182}";varengine=newPredicateExpression(exampleExpression);// Optional step to parse the expression before evaluationengine.Prepare();boolresult=engine.Evaluate();
Simple conditiona example with variables
varexampleExpression="{AND {<, $userId, 182}, {=, logged, $status}}";varengine=newPredicateExpression(exampleExpression);// Optional step to parse the expression before evaluationengine.Prepare();// Dictionary with all required variablesvarvariables=newDictionary<string,object>();variables["userId"]=42;variables["status"]="logged";boolresult=engine.Evaluate(variables);