[]
Class that parses strings and returns Expression objects that can be evaluated.
public class C1CalcEngine
This class has three extensibility points:
Use the DataContext property to add an object's properties to the engine scope.
Use the RegisterFunction method to define custom functions.
Override the GetExternalObject method to add arbitrary variables to the engine scope.
Name | Description |
---|---|
C1CalcEngine() | Initializes a new instance of a C1CalcEngine. |
Name | Description |
---|---|
CacheExpressions | Gets or sets whether the calc engine should keep a cache with parsed expressions. |
CultureInfo | Gets or sets the CultureInfo to use when parsing numbers and dates. |
DataContext | Gets or sets the DataContext for this C1CalcEngine. |
Functions | Gets the dictionary that contains function definitions. |
IdentifierChars | Gets or sets a string that specifies special characters that are valid for identifiers. |
OptimizeExpressions | Gets or sets whether the calc engine should optimize expressions when they are parsed. |
Variables | Gets the dictionary that contains simple variables (not in the DataContext). |
Name | Description |
---|---|
Evaluate(string) | Evaluates a string. |
GetExternalObject(string) | Gets an external object based on an identifier. |
Parse(string) | Parses a string into an Expression. |
RegisterFunction(string, int, CalcEngineFunction) | Registers a function that can be evaluated by this C1CalcEngine. |
RegisterFunction(string, int, int, CalcEngineFunction) | Registers a function that can be evaluated by this C1CalcEngine. |