public RemoteProcessManager(IProcessServer server, IProcessEnvironment environment, CancellationToken token) { cts = CancellationTokenSource.CreateLinkedTokenSource(token); this.server = server; DefaultProcessEnvironment = environment; ProcessNotifications = new Notifications(this); }
private IProcessRunner GetRunner() { var runner = server.ProcessRunner; if (runner == null) { server = server.ConnectSync(); runner = server?.ProcessRunner; } return(runner); }
private static bool ListCommand(IBootstrap bootstrap, string[] arguments) { foreach (IWorkItem appServer in bootstrap.AppServers) { IProcessServer processServer = appServer as IProcessServer; if (processServer != null && processServer.ProcessId > 0) { Console.WriteLine("{0}[PID:{1}] - {2}", appServer.Name, processServer.ProcessId, appServer.State); } else { Console.WriteLine("{0} - {1}", appServer.Name, appServer.State); } } return(false); }
public RemoteProcessWrapper( IProcessServer server, ProcessStartInfo startInfo, IOutputProcessor outputProcessor, Action onStart, Action onEnd, Action <Exception, string> onError, CancellationToken token) : base(startInfo) { this.server = server; this.outputProcessor = outputProcessor; this.onStart = onStart; this.onEnd = onEnd; this.onError = onError; token.Register(cts.Cancel); }
private static bool ListCommand(IBootstrap bootstrap, string[] arguments) { foreach (IWorkItem workItem in bootstrap.AppServers) { IProcessServer processServer = workItem as IProcessServer; if ((processServer != null) && (processServer.ProcessId > 0)) { Console.WriteLine("{0}[PID:{1}] - {2}", (object)workItem.Name, (object)processServer.ProcessId, (object)workItem.State); } else { Console.WriteLine("{0} - {1}", (object)workItem.Name, (object)workItem.State); } } return(false); }