我正在尝试将C#脚本集成到我的数据库应用程序中。我使用“globals”对象使全局变量可以从脚本中访问。
如果脚本首次编译,我对等待时间不满意。如何保存和加载编译以避免等待时间?
如果脚本首次编译,我对等待时间不满意。如何保存和加载编译以避免等待时间?
Script<object> script = CSharpScript.Create(scriptCode, globalsType: typeof(MyGlobals));
script.Compile(); //<-- load the Compilation from database/file here
script.RunAsync(myGlobalsInstance).Wait();