Closed daveyostcom closed 5 years ago
There is no applicable member with the name "addInput",
A member is a property, method, constructors, fields, etc.
In this Fiddle, I don't find anything either with the name "addInput".
Let me know if that explains better the error message.
I fiddled with the fiddle to add lines that were strangely missing.
Oh now it makes sense ;) We will look at it.
Hello @daveyostcom ,
It's possible to register static member but that doesn't work with non-static member. An instance must exist and it's impossible for our library which class instance it should use.
One way to make it possible is by providing the instance to the execute method
var result = Eval.Execute(text, this);
I'm fine with that. Thanks. Is it faster to call Execute rather than Compile followed by calling the compiled code? If so, how much.
I updated the test case, but now I wonder why it produces no output.
Is it faster to call Execute rather than Compile followed by calling the compiled code
Exactly the same performance. The Execute
always call the compile and then execute the returned delegate.
The compile method will be faster when you need to execute the same method multiple time. For example in a loop. The execute method is still fast but needs to build a key and check in a cache if the compiled version exists and that makes it slower than directly using the compiled delegate.
I updated the test case, but now I wonder why it produces no output.
You don't have any Console.WriteLine but you might use a different fiddle. Work fine on my side
Fixed. Thanks!
Great :)
Let me know if we can close this issue.
I intended this example to be equivalent to an example in a previous report, but it doesn't work, and I don't understand the error message: