Example #1
0
        static void Main(string[] args)
        {
            Console.CancelKeyPress += Console_CancelKeyPress;

            using (var logger = new Logger("Program", new MaxLoggingPermissions(), FileLogWriter.InTempFolder("Microsoft.R.Host.Client.Program"))) {
                var services       = new CoreServices(new AppConstants(), null, null, null, null);
                var localConnector = new LocalBrokerClient("Program", args[0], services, new NullConsole());
                var host           = localConnector.ConnectAsync(new BrokerConnectionInfo("Program", new Program())).GetAwaiter().GetResult();
                _evaluator = host;
                host.Run().GetAwaiter().GetResult();
            }
        }
Example #2
0
        static void Main(string[] args)
        {
            Console.CancelKeyPress += Console_CancelKeyPress;

            var programName = "Microsoft.R.Host.Client.Program";

            using (var shell = new CoreShell(programName)) {
                var localConnector = new LocalBrokerClient(programName, BrokerConnectionInfo.Create(null, "local", args[0], null, false), shell.Services, new NullConsole());
                var host           = localConnector.ConnectAsync(new HostConnectionInfo(programName, new Program())).GetAwaiter().GetResult();
                _evaluator = host;
                host.Run().GetAwaiter().GetResult();
            }
        }
Example #3
0
        static void Main(string[] args)
        {
            Console.CancelKeyPress += Console_CancelKeyPress;

            var programName = "Microsoft.R.Host.Client.Program";

            using (var logger = new Logger(programName, Path.GetTempPath(), new MaxLoggingPermissions())) {
                var services       = new CoreServices(null, new MaxLoggingPermissions(), null, null, null, logger, null, null);
                var localConnector = new LocalBrokerClient(programName, BrokerConnectionInfo.Create(null, "local", args[0]), services, new NullConsole());
                var host           = localConnector.ConnectAsync(new HostConnectionInfo(programName, new Program())).GetAwaiter().GetResult();
                _evaluator = host;
                host.Run().GetAwaiter().GetResult();
            }
        }