Hello,
Thanks for the awesome work.
I'm using your lib to write json configurable rules. I want to used generic and param based custom type methods as Utility methods. Below is a sample json config snippet.
{"expression": "Utilities.ConvertToArray(\"xyz\",\"abc\")"}
and below is the method with param
public static string[] ConvertToArray(params string[] values)
{
if (values == null)
{
return new string[0];
}
return values.ToArray();
}
When I try to call DynamicExpressionParser.ParseLambda method with above expression it fails with an error saying "No method called ConvertToArray found in Utilities". Please not normal method without param works just fine.
I want to create an array but since that was not possible in the expression directly using your lib I tried using the Utility method.
Similarly, generic methods also doesn't work.
Please help in providing a solution.
Thanks
Hello,
Thanks for the awesome work.
I'm using your lib to write json configurable rules. I want to used generic and param based custom type methods as Utility methods. Below is a sample json config snippet.
{"expression": "Utilities.ConvertToArray(\"xyz\",\"abc\")"}and below is the method with param
When I try to call DynamicExpressionParser.ParseLambda method with above expression it fails with an error saying "No method called ConvertToArray found in Utilities". Please not normal method without param works just fine.
I want to create an array but since that was not possible in the expression directly using your lib I tried using the Utility method.
Similarly, generic methods also doesn't work.
Please help in providing a solution.
Thanks