Метод | Описание | |
---|---|---|
CalcEngine ( ) : System | ||
Evaluate ( string expression ) : object |
Evaluates a string. If you are going to evaluate the same expression several times, it is more efficient to parse it only once using the Parse method and then using the Expression.Evaluate method to evaluate the parsed expression. |
|
GetExternalObject ( string identifier ) : object |
Gets an external object based on an identifier. This method is useful when the engine needs to create objects dynamically. For example, a spreadsheet calc engine would use this method to dynamically create cell range objects based on identifiers that cannot be enumerated at design time (such as "AB12", "A1:AB12", etc.) |
|
Parse ( string expression ) : Expression |
Parses a string into an Expression.
|
|
RegisterFunction ( string functionName, int parmCount, CalcEngineFunction fn ) : void |
Registers a function that can be evaluated by this CalcEngine.
|
|
RegisterFunction ( string functionName, int parmMin, int parmMax, CalcEngineFunction fn ) : void |
Registers a function that can be evaluated by this CalcEngine.
|
Метод | Описание | |
---|---|---|
AddToken ( object symbol, TKID id, TKTYPE type ) : void | ||
GetFunctionTable ( ) : FunctionDefinition>.Dictionary |
||
GetMember ( ) : CalcEngine.Token | ||
GetParameters ( ) : List |
||
GetSymbolTable ( ) : Token>.Dictionary | ||
GetToken ( ) : void | ||
ParseAddSub ( ) : Expression | ||
ParseAtom ( ) : Expression | ||
ParseCompare ( ) : Expression | ||
ParseDouble ( string str, |
||
ParseExpression ( ) : Expression | ||
ParseMulDiv ( ) : Expression | ||
ParsePower ( ) : Expression | ||
ParseUnary ( ) : Expression | ||
Throw ( ) : void | ||
Throw ( string msg ) : void |
public Evaluate ( string expression ) : object | ||
expression | string | Expression to evaluate. |
Результат | object |
public GetExternalObject ( string identifier ) : object | ||
identifier | string | |
Результат | object |
public Parse ( string expression ) : Expression | ||
expression | string | String to parse. |
Результат | Expression |
public RegisterFunction ( string functionName, int parmCount, CalcEngineFunction fn ) : void | ||
functionName | string | Function name. |
parmCount | int | Parameter count. |
fn | CalcEngineFunction | Delegate that evaluates the function. |
Результат | void |
public RegisterFunction ( string functionName, int parmMin, int parmMax, CalcEngineFunction fn ) : void | ||
functionName | string | Function name. |
parmMin | int | Minimum parameter count. |
parmMax | int | Maximum parameter count. |
fn | CalcEngineFunction | Delegate that evaluates the function. |
Результат | void |