Expression Class
Namespace: Stimulsoft.Data.Expressions.NCalc
Constructors
| Constructor | Description |
|---|---|
| constructor() | Textual representation of the expression to evaluate. |
constructor()
Textual representation of the expression to evaluate.
Properties
| Property | Type | Description |
|---|---|---|
cacheEnabled static |
boolean |
Methods
| Method | Returns | Description |
|---|---|---|
compile static |
LogicalExpression | |
create1 static |
Expression | |
create2 static |
Expression | |
| evaluate | any | |
| hasErrors | boolean | Pre-compiles the expression in order to check syntax errors. If errors are detected, the Error property contains the message. |
Method Details
compile static
compile(expression: string, nocache: boolean): LogicalExpression
Parameters
- expression (string)
- nocache (boolean)
Returns LogicalExpression
create1 static
create1(expression: string, options: EvaluateOptions): Expression
Parameters
- expression (string)
- options (EvaluateOptions)
Returns Expression
create2 static
create2(expression: LogicalExpression, options: EvaluateOptions): Expression
Parameters
- expression (LogicalExpression)
- options (EvaluateOptions)
Returns Expression
evaluate
evaluate(): any
Returns any
hasErrors
hasErrors(): boolean
Pre-compiles the expression in order to check syntax errors. If errors are detected, the Error property contains the message.
Returns boolean — True if the expression syntax is correct, otherwiser False
Fields
| Field | Type | Description |
|---|---|---|
| error | string | |
| evaluateFunction | any | |
| evaluateParameter | any | |
| logicalExpression | any | |
| options | EvaluateOptions | |
| originalExpression | string | |
| parameterEnumerators | Dictionary<string, any[]> | |
| parameters | Dictionary<string, any> | |
| parametersBackup | Dictionary<string, any> | |
| parsedExpression | LogicalExpression | |
| size | any |