Пример #1
0
 /// <summary>
 /// construct a new object to represent the lifecycle of a process being scheduled
 /// </summary>
 public Process(ISchedulerProcess p, IProcessWatcher w, string cmd, ILogger l)
 {
     schedulerProcess = p;
     state            = State.Initializing;
     commandLine      = cmd;
     watcher          = w;
     cancelTask       = new TaskCompletionSource <bool>();
     directory        = null;
     statusVersion    = 0;
     statusString     = "";
     logger           = l;
 }
Пример #2
0
 /// <summary>
 /// construct a new object to represent the lifecycle of a process being scheduled
 /// </summary>
 public Process(ISchedulerProcess p, IProcessWatcher w, string cmd, string cmdLineArgs, ILogger l)
 {
     schedulerProcess = p;
     state = State.Initializing;
     CommandLine = cmd;
     CommandLineArguments = cmdLineArgs;
     watcher = w;
     cancelTask = new TaskCompletionSource<bool>();
     directory = null;
     statusVersion = 0;
     statusString = "";
     logger = l;
 }
Пример #3
0
        public IProcess NewProcess(IProcessWatcher watcher, string commandLine, string commandLineArguments)
        {
            ISchedulerProcess process = scheduler.NewProcess();

            return(new Process(process, watcher, commandLine, commandLineArguments, logger));
        }