/// <summary> /// /// This code makes the call to inject a DLL and then execute its targeted functionality /// /// </summary> /// <param name="Parameters">The parameters used for the DLL injection and execution</param> /// <param name="ExecDLL">The filepath to the DLL</param> /// <param name="Body">The values that will be used by the DLL</param> /// <returns>The return value(s) desired by the code execution</returns> private List <Dictionary <string, string> > LoadAndExecuteDLL(string Parameters, string ExecDLL, List <Dictionary <string, string> > Body) { bool bSafeMode = (GetMode(Body) == "safe"); var MDRoot = RoleEnvironment.GetConfigurationSettingValue("MetadataRootFileSystem"); if (bSafeMode) { return(RunnableExecutor.LoadAndExecuteDLLSafe(MDRoot, Parameters, ExecDLL, Body)); } else { return(RunnableExecutor.LoadAndExecuteDLL(MDRoot, Parameters, ExecDLL, Body)); } }
/// <summary> /// /// This code makes the call to compile and execute a block of code /// /// </summary> /// <param name="UrlParameters">The parameters used for the code compilation/execution</param> /// <param name="ExecCode">The block of code that will be compiled and then executed</param> /// <param name="Body">The values that will be used by the block of code</param> /// <returns>The return value(s) desired by the code execution</returns> private List <Dictionary <string, string> > CompileAndExecuteCode(string UrlParameters, string ExecCode, List <Dictionary <string, string> > Body) { bool bSafeMode = (GetMode(Body) == "safe"); if (bSafeMode) { return(RunnableExecutor.CompileAndExecuteCodeSafe(UrlParameters, ExecCode, Body)); } else { RunnableExecutor executor = new RunnableExecutor(); return(executor.CompileAndExecuteCode(UrlParameters, ExecCode, Body)); } }