public static string Evaluate(string script, string scriptType, Hashtable variables) { MacroScriptEngine mse = new MacroScriptEngine(scriptType); mse.ScriptVariables = ConvertHashTable(variables); mse.Script = script; return(mse.Evaluate()); }
internal static MacroScriptEngine LoadEngineByFileExtension(string fileExtension) { MacroScriptEngine mse = new MacroScriptEngine(); mse.loadRunTime(); mse.m_engine = mse.m_runTime.GetEngineByFileExtension(fileExtension); mse.m_exceptionOperations = mse.m_engine.GetService<ExceptionOperations>(); return mse; }
internal static MacroScriptEngine GetEngineByType(string scriptType) { MacroScriptEngine mse = new MacroScriptEngine(); mse.loadRunTime(); mse.m_engine = mse.m_runTime.GetEngine(scriptType); mse.m_exceptionOperations = mse.m_engine.GetService<ExceptionOperations>(); return mse; }
internal static MacroScriptEngine GetEngineByType(string scriptType) { MacroScriptEngine mse = new MacroScriptEngine(); mse.loadRunTime(); mse.m_engine = mse.m_runTime.GetEngine(scriptType); mse.m_exceptionOperations = mse.m_engine.GetService <ExceptionOperations>(); return(mse); }
internal static MacroScriptEngine LoadEngineByFileExtension(string fileExtension) { MacroScriptEngine mse = new MacroScriptEngine(); mse.loadRunTime(); mse.m_engine = mse.m_runTime.GetEngineByFileExtension(fileExtension); mse.m_exceptionOperations = mse.m_engine.GetService <ExceptionOperations>(); return(mse); }
public static string ExecuteFile(string path, Hashtable variables) { string fileEnding = path.Substring(path.LastIndexOf('.')).Trim('.'); MacroScriptEngine mse = MacroScriptEngine.LoadEngineByFileExtension(fileEnding); mse.ScriptVariables = ConvertHashTable(variables); return(mse.ExecuteFile(path)); }