Esempio n. 1
0
 /// <summary>
 /// Runs a process.
 /// </summary>
 /// <remarks>You don't need to call <see cref="ProcessManager.Configure{T}(T, string)"/> on this task,
 /// it already does it in the constructor.
 /// </remarks>
 public NativeProcessListTask(ITaskManager taskManager,
                              IProcessManager processManager,
                              string executable,
                              string arguments,
                              Func <IProcessTask <T, List <T> >, string, T> processor,
                              string workingDirectory = null,
                              CancellationToken token = default)
     : base(taskManager, processManager.EnsureNotNull(nameof(processManager)),
            processManager.DefaultProcessEnvironment, null,
            executable, arguments, workingDirectory, null, processor, false, true, token)
 {
 }
 /// <summary>
 /// Runs a dotnet process. On Windows, it just runs the executable. On non-Windows,
 /// it runs the executable using Unity's mono.
 /// </summary>
 /// <remarks>You don't need to call <see cref="ProcessManager.Configure{T}(T, string)"/> on this task,
 /// it already does it in the constructor.
 /// </remarks>
 public DotNetProcessListTask(ITaskManager taskManager,
                              IProcessManager processManager,
                              string executable,
                              string arguments,
                              IOutputProcessor <T, List <T> > outputProcessor,
                              string workingDirectory = null,
                              CancellationToken token = default)
     : base(taskManager, processManager.EnsureNotNull(nameof(processManager)),
            processManager.DefaultProcessEnvironment, processManager.DefaultProcessEnvironment.Environment,
            executable, arguments, workingDirectory, outputProcessor, false, false, token)
 {
 }
 public StringListProcessTask(
     ITaskManager taskManager, IProcessManager processManager,
     string executable, string arguments, string workingDirectory = null,
     CancellationToken token = default
     )
     : base(taskManager,
            processManager.EnsureNotNull(nameof(processManager)).DefaultProcessEnvironment,
            executable, arguments,
            new StringListOutputProcessor(), token: token)
 {
     processManager.Configure(this, workingDirectory);
 }
 /// <summary>
 /// Runs a dotnet process. On Windows, it just runs the executable. On non-Windows,
 /// it runs the executable using Unity's mono.
 /// </summary>
 /// <remarks>You don't need to call <see cref="ProcessManager.Configure{T}(T, string)"/> on this task,
 /// it already does it in the constructor.
 /// </remarks>
 public DotNetProcessListTask(ITaskManager taskManager,
                              IProcessManager processManager,
                              IProcessEnvironment processEnvironment,
                              IEnvironment environment,
                              string executable,
                              string arguments,
                              Func <IProcessTask <T, List <T> >, string, bool> isMatch,
                              Func <IProcessTask <T, List <T> >, string, T> processor,
                              string workingDirectory = null,
                              CancellationToken token = default)
     : base(taskManager, processManager.EnsureNotNull(nameof(processManager)),
            processEnvironment ?? processManager.DefaultProcessEnvironment, environment,
            executable, arguments, workingDirectory, isMatch, processor, false, false, token)
 {
 }