Skip to content

Commit 3a6e470

Browse files
committed
Добавлен параметр завершения дочерних процессов в метод Завершить()
1 parent 8207c80 commit 3a6e470

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/OneScript.StandardLibrary/Processes/ProcessContext.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,15 @@ public int ProcessId
196196

197197
[ContextProperty("Имя", "Name")] public string Name => _p.ProcessName;
198198

199-
[ContextMethod("Завершить","Stop")]
200-
public void Stop()
199+
/// <summary>
200+
/// Завершить процесс и, опционально, все его дочерние процессы.
201+
/// </summary>
202+
/// <param name="entireProcessTree">Булево. Завершить все дочерние процессы.</param>
203+
/// <exception cref="AggregateException">Не все дочерние процессы удалось завершить (только при entireProcessTree = true).</exception>
204+
[ContextMethod("Завершить", "Stop")]
205+
public void Stop(bool entireProcessTree = false)
201206
{
202-
_p.Kill();
207+
_p.Kill(entireProcessTree);
203208
}
204209

205210
public void Dispose()

0 commit comments

Comments
 (0)