/* public static Process execute(this API_NodeJS nodeJS, string arguments, Action<string> onConsoleOut) * { * return nodeJS.Executable.startProcess(arguments, onConsoleOut); * } */ public static string help(this API_NodeJS nodeJS) { return(nodeJS.execute("-h")); }
/* public static Process eval(this API_NodeJS nodeJS, string evalScript, Action<string> onConsoleOut) * { * return nodeJS.execute("-p -e {0}".format(evalScript), onConsoleOut); * }*/ public static string eval(this API_NodeJS nodeJS, string evalScript) { return(nodeJS.execute("-p -e {0}".format(evalScript)).trim()); }
public static string execute(this API_NodeJS nodeJS, string arguments) { return(nodeJS.Executable.startProcess_getConsoleOut(arguments)); }
public static bool isInstalled(this API_NodeJS nodeJS) { return(nodeJS.Executable.fileExists()); }
public static string update_NodeJs_ExeFolder(this API_NodeJS nodeJs, string exeFolder) { return(nodeJs.Executable = exeFolder.pathCombine(API_NodeJS.nodeJS_VirtualPath) .pathCombine(API_NodeJS.nodeJS_ExeLocation)); }
public NodeJsController() { NodeJS = new API_NodeJS(); }
public Test_NodeJS() { apiNodeJs = new API_NodeJS(); nodeJsExeFolder = this.WebSite_Root_OnDisk(); nodeJS_Exe = apiNodeJs.update_NodeJs_ExeFolder(nodeJsExeFolder); }