示例#1
0
        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);
        }
示例#2
0
 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);
     }
 }
示例#3
0
		public async static Task RunTests (CSharpReplServerProxy proxy)
		{
			var output = await proxy.getUsings ();
			PrintResult (output);
		}
示例#4
0
            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;
            }
示例#5
0
            public ReplSession(ReplView view, string address)
            {
                replView = view;
                this.port = port;

                var tmprepl = new CSharpReplServerProxy (address);
                tmprepl.Start ();
                repl = tmprepl;
            }