3
using System.Diagnostics;
5
using TextEditor.CompilerService;
8
[assembly:AddinDependency ("TextEditor.CompilerService", "1.0")]
10
namespace TextEditor.CompilerService.CSharp
13
public class CSharpCompiler: ICompiler
15
public bool CanCompile (string file)
17
return Path.GetExtension (file) == ".cs";
20
public string Compile (string file, string outFile)
24
ProcessStartInfo ps = new ProcessStartInfo ();
26
ps.Arguments = "file";
27
ps.UseShellExecute = false;
28
ps.RedirectStandardOutput = true;
29
Process p = Process.Start (ps);
32
while ((line = p.StandardOutput.ReadLine ()) != null) {
33
messages += line + "\n";
b'\\ No newline at end of file'