Пример #1
0
        public RHost(string name, IRCallbacks callbacks)
        {
            Check.ArgumentStringNullOrEmpty(nameof(name), name);

            _callbacks = callbacks;
            _name      = name;

            _fileLogWriter = FileLogWriter.InTempFolder("Microsoft.R.Host.Client" + "_" + name);
            _log           = new LinesLog(_fileLogWriter);
        }
Пример #2
0
        public RHost(string name, IRCallbacks callbacks, IMessageTransport transport, CancellationTokenSource cts)
        {
            Check.ArgumentStringNullOrEmpty(nameof(name), name);

            _callbacks = callbacks;
            _transport = transport;
            _cts       = cts;

            _fileLogWriter = FileLogWriter.InTempFolder("Microsoft.R.Host.Client" + "_" + name);
            _log           = new LinesLog(_fileLogWriter);
        }
Пример #3
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();
            }
        }