public static void Main(string[] args) { var proxy = new CSharpReplServerProxy(33333); proxy.Start(); var output = proxy.evaluate("var x = 10;"); output = proxy.evaluate("for (int ii = 0; ii < 3; ii++) { Console.WriteLine(ii); }"); // var repl = new CSharpRepl(); // var output = repl.evaluate("10*10;"); Console.WriteLine(output.ResultType.ToString()); // output = repl.evaluate("var x = 10;"); // Console.WriteLine("{0}: {1}",output.ResultType.ToString(),output.Result); // output = repl.evaluate("x;"); // Console.WriteLine("{0}: {1}",output.ResultType.ToString(),output.Result); }
void ConnectToInteractiveSession() { var tmpshell = new CSharpReplServerProxy(33333); try { tmpshell.Start(); this.shell = tmpshell; this.Running = true; view.WriteOutput("Successfully connected to interactive session."); } catch (Exception e) { this.shell = null; this.Running = false; view.WriteOutput("Failed connecting to interactive session: " + e.Message); } }
public async static Task RunTests (CSharpReplServerProxy proxy) { var output = await proxy.getUsings (); PrintResult (output); }
public ReplSession(ReplView view, int port, Process proc = null) { replView = view; process = proc; this.port = port; if (proc != null) { stderr = new StreamOutputter (proc.StandardError, replView); stdout = new StreamOutputter (proc.StandardOutput, replView); Stderr.Start (); Stdout.Start (); } var tmprepl = new CSharpReplServerProxy (String.Format ("tcp://127.0.0.1:{0}", port)); tmprepl.Start (); repl = tmprepl; }
public ReplSession(ReplView view, string address) { replView = view; this.port = port; var tmprepl = new CSharpReplServerProxy (address); tmprepl.Start (); repl = tmprepl; }