Skip to content

Commit 58d6188

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

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/OneScript.StandardLibrary/Processes/ProcessContext.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,14 @@ 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+
[ContextMethod("Завершить", "Stop")]
204+
public void Stop(bool entireProcessTree = false)
201205
{
202-
_p.Kill();
206+
_p.Kill(entireProcessTree);
203207
}
204208

205209
public void Dispose()

0 commit comments

Comments
 (0)