mercredi 30 janvier 2019

Parsing a C# string statement and executing it via reflection to get a value

Is there a utility that can take a C# string like this:

'Utils.ComputeValue('Myval1', 'Myval2');'

And execute the underlying function via reflection and return a value?

I can parse and trigger via reflection myself, but am trying to avoid that.

The idea is also to restrict ability to call functions into one specific namespace... to avoid abuse.





Aucun commentaire:

Enregistrer un commentaire