[]
The C1CalcEngine class is used to work with expression engines, and provides an API for analyzing and evaluate expression.
public class C1CalcEngine : IEngine, IEngineExtended, IEngineExpressionItems, ISupportAliases, ISupportCustomFunctions, ISupportVariables
Name | Description |
---|---|
C1CalcEngine() | Initializes a new instance of the C1CalcEngine class with the default engine. |
C1CalcEngine(IEngine) | Initializes a new instance of the C1CalcEngine class with the custom engine. |
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. |
DataSource | Gets or sets the object used as the data source. |
Engine | Gets or sets current IEngine. |
EngineExtended | Gets the IEngineExtended object when the current IEngine implements it. |
Expression | Gets or sets expression string. |
IsValid | Gets a value that indicates whether the expression is valid. |
Name | Description |
---|---|
AddAlias(string, string) | Adds an alias for a field from DataSource. |
AddFunction(List<ExpressionItem>, Func<List<object>, object>, int, int) | Adds a custom function. |
AddVariable(string, object) | Adds a variable. |
Evaluate() | Gets a result of expression. |
GetErrors() | Gets a enumerator of ErrorInfo objects. |
GetExpressionItems() | Gets a enumerator of ExpressionItem of the current context. |
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. |