Running C# code from JINT (server side) -
this not correct use of jint, , if knows of other systems can this, open them, long can serialize string - need find way use jint parse , run c# code. new idea of jint whole, not sure go around searching for. i'd able setup ...
public int getvalue(string name){ // database work find value requested // return value found } string s = "getvalue('something') * 2"; and capable of parsing string , running it, getvalue executing , passing in given parameter. possible in jint, or similar framework?
you can setfunction(string name, delegate function) jintengine
jintengine engine=new jintengine(); func<string,int> function = getvalue; engine.setfunction("getvalue", function); var run = engine.run("getvalue('something') * 2");
Comments
Post a Comment