[]
        
(Showing Draft Content)

C1.CalcEngine.ExpressionEngine.Expression

Expression Class

Base class that represents parsed expressions.

Namespace: C1.CalcEngine.ExpressionEngine
Assembly: C1.CalcEngine.dll
Syntax
public class Expression : IExpression, IComparable<IExpression>
Remarks

For example:

Expression expr = engine.Parse(strExpression);
object val = expr.Evaluate();

Constructors

Name Description
Expression(IExpressionEngine)

Initializes a new instance of the Expression class.

Expression(IExpressionEngine, Token)

Initializes a new instance of the Expression class.

Expression(IExpressionEngine, object)

Initializes a new instance of the Expression class.

Properties

Name Description
Engine

Gets the IExpressionEngine that owns this IExpression.

Expressions

Gets the expressions used in this expression for evaluation.

Token

Gets a token of this expression.

Methods

Name Description
CompareTo(IExpression)

Compares this instance with a specified IExpression object.

Evaluate()

Gets a result of expression.

GetBool(IExpression)

Casts the result of evaluating an IExpression to the Boolean type.

GetDateTime(IExpression)

Casts the result of evaluating an IExpression to the DateTime type.

GetDouble(IExpression)

Casts the result of evaluating an IExpression to the Double type.

GetString(IExpression)

Casts the result of evaluating an IExpression to the String type.

GetTimeSpan(IExpression)

Casts the result of evaluating an IExpression to the TimeSpan type.

IsNull(object)

Checks whether the specified value is null od DBNull.

Optimize()

Optimizes this expression.