matheval / expression-evaluator-c-sharp

Matheval is a mathematical expressions evaluator library written in C#. Allows to evaluate mathematical, boolean, string and datetime expressions
https://matheval.org/
MIT License
107 stars 29 forks source link

Add External Function capability #18

Closed bwakabats closed 11 months ago

bwakabats commented 11 months ago

Add a TryExternalFunction function method to the Expression object. If a Function is not found internally, then this method is called so new functionality can be very easily added for specific usages. the TryExternalFunction function is passed the name of the function plus the arguments and uses the Try pattern.

The unit tests show example usage by adding a "Range" function and a "Repeat" function.

bwakabats commented 11 months ago

Just found https://github.com/matheval/expression-evaluator-c-sharp/pull/8 Assume this will be a PR soon