Skip to content
Discussion options

You must be logged in to vote

I've found a way to return the method using ClrFunctionInstance. It was easier than it seemed though I'm not sure if there's a better way:

return new ClrFunctionInstance(engine, memberName, (thisObject, arguments) =>
{
    return CallMethod(engine, method, methodParameters, (ObjectWrapper)thisObject, arguments);
}, methodParameters.Length, PropertyFlag.Configurable); // Why PropertyFlag.Configurable?? No idea.

I uploaded the full code to this gist for future reference. Maybe it can help someone.

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
3 replies
@luttje
Comment options

@luttje
Comment options

@luttje
Comment options

Comment options

You must be logged in to vote
3 replies
@lahma
Comment options

lahma Aug 27, 2021
Collaborator

@luttje
Comment options

@lahma
Comment options

lahma Aug 27, 2021
Collaborator

Answer selected by luttje
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants