Closed tobiasdroessler closed 4 years ago
You can easily register any API that you want to expose for expressions in this way:
class MathFunctions {
public double Pow(double x, double y) => Math.Pow(x,y);
}
varContext["Math"] = new MathFunctions();
Console.WriteLine(lambdaParser.Eval("Math.Pow(2,2)", varContext));
ah, thank you .. now I get it !!
Thats nice.
Is it both possible and ready to use ?
Or is there a possibility to register external functions to extent feature set?
ref to dotnet math: (https://docs.microsoft.com/de-de/dotnet/api/system.math.pow?view=netcore-3.1)