Skip to content

Unable to extend evaluator with additional Functions, no equivilent of AddOperation on parser.cs #7

@MSpekkio

Description

@MSpekkio

My use case requires the ability to add into some additional simple functions for common business rule stuff (imagine a ORDER_ID() function that takes strings and produces a valid order id). In some cases, I could build the expression from using the provided functions, but since the idea of using your Evaluation engine is to expose a simple 'Excel' like set of functions for my users, the required complexity to get business rules is too high.

The Parser supports registering custom operators but the way Type.GetType locates the function identifiers, it can't locate types outside the org.matheval assembly.

See MSDN:
image

With this issue I'm also uploading proposed API addition to Parser.cs.
image

and
image

And a simple test in TestAll.cs
image

to support my use case.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions