/// <summary> /// Starts R host process. /// </summary> /// <param name="callback"> /// A set of callbacks that are called when R engine requests certain operation /// that are usually provided by the application /// </param> /// <param name="workingDirectory">R working directory</param> /// <param name="codePage">R code page to set</param> /// <param name="timeout">Timeout to wait for the host process to start</param> /// <param name="cancellationToken">Cancellation token</param> /// <exception cref="OperationCanceledException" /> /// <exception cref="RHostDisconnectedException" /> public Task StartHostAsync(IRHostSessionCallback callback, string workingDirectory = null, int codePage = 0, int timeout = 3000, CancellationToken cancellationToken = default(CancellationToken)) { _userSessionCallback = callback; _rSessionCallback = new RSessionCallback(_userSessionCallback); var startupInfo = new RHostStartupInfo(null, workingDirectory, codePage, isInteractive: true); return(_session.StartHostAsync(startupInfo, _rSessionCallback, timeout, cancellationToken)); }
public RManager(IRHostSessionCallback rhostSession) { //logger = loggerFacade; rHostSessionCallback = rhostSession; //eventAggregator = evtAggregator; WindowsDirectory = Path.GetTempPath(); }
public async Task StartHostAsync(IRHostSessionCallback rHostSessionCallback) { await rHostSession.StartHostAsync(rHostSessionCallback); }
public RSessionApiTest() { _callback = Substitute.For <IRHostSessionCallback>(); _session = RHostSession.Create(nameof(RSessionApiTest)); }
public RSessionCallback(IRHostSessionCallback cb) { _cb = cb; }
public RManager(IRHostSessionCallback rhostSession, ILoggerFacade loggerFacade, IROperations rOps) { //logger = loggerFacade; rHostSessionCallback = rhostSession; rOperations = rOps; }