MicroRuleEngine icon indicating copy to clipboard operation
MicroRuleEngine copied to clipboard

The engine is unable to invoke Extension methods. Is this correct understanding?

Open MithunChopda opened this issue 1 year ago • 1 comments

When trying to invoke Extension methods, the engine throws method not found exception. I am assuming because typeof() returns the base type and thus the extensions methods are not visible. Is this correct understanding? Example: User.Identities.First() here method First is not found

MithunChopda avatar Jun 28 '24 19:06 MithunChopda

That is correct. It's only designed to find instance methods.
I believe getting it to recognize an extension method using the instance method syntax would be quite difficult. It'll probably be easier to get it to recognize the method using the static method syntax: Enumerable.First(User.Identities), but even that would be a major change to the code.

jamescurran avatar Jun 28 '24 22:06 jamescurran