We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
this a complete library... one of the best I've seen. the only feature that is missing is support for extended methods.
for example. I declare this class
public static class MyAuxiliarMethods { public static string MyExtendedMethod(this string str) { return str + " extended"; } }
then I should add this type somewhere so all the exteded methods became registered. or maybe just adding the corresponding namespace...
then I could evaluate an expression like this:
AnStringVariable.MyExtendedMethod()
The text was updated successfully, but these errors were encountered:
Hello @TheoVC, thanks for your issues. For this one a solution already exists but I didn't documented this yet:
public static class StringExtendedMethods { public static string AddExtended(this string str) { return str + " extended"; } } class Program { static void Main(string[] args) { ExpressionEvaluator evaluator = new ExpressionEvaluator(new Dictionary<string, object>() { { "x", "Test" } }); evaluator.StaticTypesForExtensionsMethods.Add(typeof(StringExtendedMethods)); Console.WriteLine(evaluator.Evaluate("x.AddExtended()")); } }
I will update the documentation as soon as possible
Sorry, something went wrong.
I added some documentation about Extension method on the wiki
No branches or pull requests
this a complete library... one of the best I've seen. the only feature that is missing is support for extended methods.
for example. I declare this class
then I should add this type somewhere so all the exteded methods became registered.
or maybe just adding the corresponding namespace...
then I could evaluate an expression like this:
AnStringVariable.MyExtendedMethod()
The text was updated successfully, but these errors were encountered: