[]
        
(Showing Draft Content)

C1.WPF.Binding.C1CalcEngine

C1CalcEngine Class

Class that parses strings and returns Expression objects that can be evaluated.

Inheritance
C1CalcEngine
Namespace: C1.WPF.Binding
Assembly: C1.WPF.Binding.4.6.2.dll
Syntax
public class C1CalcEngine
Remarks

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.

Constructors

Name Description
C1CalcEngine()

Initializes a new instance of a C1CalcEngine.

Properties

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).

Methods

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.