[]
        
(Showing Draft Content)

C1.CalcEngine.ExpressionEngine.ExpressionEngine

ExpressionEngine Class

The base class of expression engines is used to dynamically produce an expression and get the result of the expression.

Inheritance
ExpressionEngine
Namespace: C1.CalcEngine.ExpressionEngine
Assembly: C1.CalcEngine.dll
Syntax
public abstract class ExpressionEngine : IExpressionEngine, IEngineExtended, IEngineExpressionItems, ISupportAliases, ISupportCustomFunctions

Constructors

Name Description
ExpressionEngine()

Initializes a new instance of the ExpressionEngine class.

Properties

Name Description
CultureInfo

Gets or sets the CultureInfo to use when parsing numbers and dates.

CurrentIndex

Gets or sets the index of the entry from data source.

CurrentPosition

Current pointer into expression.

DataSource

Gets or sets the object used as the data source.

DecimalSeparator

Gets a localized decimal separator.

Expression

Gets or sets the expression string.

IsValid

Gets a value that indicates whether the expression is valid.

ListSeparator

Gets a localized list separator.

OptimizedExpression

Expression being parsed.

Syntax

Gets an object containing the syntax of the expression engine.

Methods

Name Description
AddAlias(string, string)

Adds an alias for a field from DataSource.

AddError(int, int, ErrorType)

Adds an error to the error collection.

AddFunction(List<ExpressionItem>, Func<List<object>, object>, int, int)

Adds a custom function.

ClearCachedExpression()

Clears the cached expression.

Evaluate()

Gets a result of expression.

GetBinaryExpression(Token, IExpression, IExpression)

Gets a binary expression.

GetBindingExpression(IEnumerable<PropertyInfo>, IEnumerable<string>)

Gets a binding expression.

GetCustomFunctionExpression(string, CustomFunctionDefinition, List<IExpression>)

Gets a custom function expression.

GetErrors()

Gets a enumerator of ErrorInfo objects.

GetExpressionItems()

Gets a enumerator of ExpressionItem of the current context.

GetFieldNames()

Gets the data source field names.

GetFunctionExpression(string, FunctionDefinition, List<IExpression>)

Gets a function expression.

GetInExpression(List<IExpression>, IExpression)

Gets a IN expression.

GetIndex()

Gets the index of the collection object.

GetItemsCount(IExpression)

Gets a count of data source items.

GetObjectName()

Gets the name of the data field for the current token.

GetUnaryExpression(Token, IExpression)

Gets a unary expression.

GetValue(IEnumerable<object>)

Gets a value from data source.

GetVariableExpression(IDictionary<string, object>, string)

Gets a variable expression.

IsDot()

Checks the current token for the DOT type.

IsExpressionEnd(char)

Checks whether the character is the end of the expression.

IsLetter(char)

Checks if a character is a letter.

Parse()

Parses an Expression string.

ParseIdentifier(char, int)

Parses an identifier string.

ParseIdentifier(string)

Parses an identifier string.

ParsePostfix(string, int)

Parses postfix of expression.

ParsePrefix(string, int)

Parses prefix of expression.

TryAddAlias(string, string)

Tries to add an alias for a field from DataSource.

TryEvaluate(out object)

Gets a result of expression. A return value indicates whether the evaluate succeeded or failed.