Beispiel #1
0
 public static string Evaluate(string script, string scriptType, Hashtable variables)
 {
     var mse = new MacroScriptEngine(scriptType);
     mse.ScriptVariables = ConvertHashTable(variables);
     mse.Script = script;
     return mse.Evaluate();
 }
Beispiel #2
0
        public static string Execute(string script, string scriptType, Hashtable variables)
        {
            var mse = new MacroScriptEngine(scriptType);

            mse.ScriptVariables = ConvertHashTable(variables);
            mse.Script          = script;
            return(mse.Execute());
        }
Beispiel #3
0
        public static string ExecuteFile(string path, Hashtable variables)
        {
            var fileEnding = path.Substring(path.LastIndexOf('.')).Trim('.');
            var mse        = MacroScriptEngine.LoadEngineByFileExtension(fileEnding);

            mse.ScriptVariables = ConvertHashTable(variables);
            return(mse.ExecuteFile(path));
        }
Beispiel #4
0
 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;
 }
Beispiel #5
0
 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;
 }
Beispiel #6
0
        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);
        }
Beispiel #7
0
        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);
        }