I'm currently investigating how to create and execute a script that is parsed from a file.
We are using XML to provide commands to the app and I would need to parse the string and convert it into blocks of code to execute. It would be simple logic commands to start with "if x > y then z". An example of the string is:
#VCurrentTime > #VUWTTimeStamp + 20
My question is 2 parts.
How could I achieve this? I have come across roslyn and a few other questions on here (Evaluating string “3*(4+2)” yield int 18, Is it possible to compile and execute new code at runtime in .NET?) but i appear to run into the same issues. How to discern and get the appropriate values from the string i.e how to convert "#VCurrentTime" to equal the local variable.