Constructors
Properties
Undeclareds
#Iterate over all global variables in this expression. This expression probably cannot be evaluated unless a Resolver is supplied which provides values for all these globals.
Methods
Evaluate
#Evaluate this expression. If the expression relies on external variables, you cannot use this overload.
Returns: The result of the expression.
Evaluate
#Evaluate this expression.
Parameters:
| resolver (Resolver) | Variable resolver. You only need a resolver if the expression contains undeclared variables. |
Returns: The result of the expression.
EvaluateSafe
#Evaluate this expression. Any exceptions thrown during evaluation will be returned as a string instead.
Returns: Result of expression or a string describing why it failed.
EvaluateSafe
#Evaluate this expression. Any exceptions thrown during evaluation will be returned as a string instead.
Parameters:
| resolver (Resolver) | Variable resolver. You only need a resolver if the expression contains undeclared variables. |
Returns: Result of expression or a string describing why it failed.
HasUndeclareds
#Test whether this expression has any undeclareds other than the provided list.
Parameters:
| ignoreList (params string[]) | List of undeclared variable names to ignore. |
Returns: True if there's at least one undeclared variable with a name not on the list.
TryCreate
#Try and create an expression. This method doesn't throw.
Parameters:
| userCode (string) | Expression code. |
Returns: Expression or null.