public CSharpCompiler(string code, IExecutionProperties execProps, ICompilerProperties compProps, string[] imports = null, IGlobals globals = null) { SourceCode = code; ExecuteProperties = execProps; CompilerProperties = compProps; if (imports == null || !imports.Any()) { LoadReferences(); } else { Imports = imports; } Globals = globals ?? new Globals(new StringBuilder()); Create(); }
public VbCompiler(string code, IExecutionProperties execProps, ICompilerProperties compProps, string[] imports = null) { SourceCode = code; ExecuteProperties = execProps; CompilerProperties = compProps; if (imports == null) { //TODO: Load references for VB (now: C#) //LoadReferences(); } else { Imports = imports; } Create(); }
public JavaCompiler(string code, IExecutionProperties execProps, ICompilerProperties compProps, string jdkPath = null) { SourceCode = code; ExecuteProperties = execProps; CompilerProperties = compProps; if (string.IsNullOrWhiteSpace(jdkPath) || !Directory.Exists(jdkPath)) { //Search for JDK if jdkPath is invalid directory FindJdk(); } else { //Use JDK Path parameter JdkPath = jdkPath; } }