Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ IsSelfOrDescendantOf()

bool System.Diagnostics.Process.IsSelfOrDescendantOf ( Process processOfInterest)
inlineprivate

Definition at line 2382 of file Process.cs.

2383 {
2385 {
2386 return true;
2387 }
2388 Process[] processes = GetProcesses();
2389 try
2390 {
2392 Process result = this;
2393 do
2394 {
2395 foreach (Process childProcess in result.GetChildProcesses(processes))
2396 {
2397 if (processOfInterest.Equals(childProcess))
2398 {
2399 return true;
2400 }
2401 queue.Enqueue(childProcess);
2402 }
2403 }
2404 while (queue.TryDequeue(out result));
2405 }
2406 finally
2407 {
2408 Process[] array = processes;
2409 foreach (Process process in array)
2410 {
2411 process.Dispose();
2412 }
2413 }
2414 return false;
2415 }
bool Equals(Process process)
Definition Process.cs:2272
static Process[] GetProcesses()
Definition Process.cs:1089

References System.array, System.Runtime.Serialization.Dictionary, System.Diagnostics.Process.Equals(), System.Diagnostics.Process.GetChildProcesses(), and System.Diagnostics.Process.GetProcesses().

Referenced by System.Diagnostics.Process.Kill().