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

◆ KillTree() [2/2]

List< Exception > System.Diagnostics.Process.KillTree ( SafeProcessHandle handle)
inlineprivate

Definition at line 2294 of file Process.cs.

2295 {
2296 List<Exception> list = null;
2297 try
2298 {
2299 Kill();
2300 }
2301 catch (Win32Exception item)
2302 {
2303 (list ?? (list = new List<Exception>())).Add(item);
2304 }
2306 try
2307 {
2308 foreach (var item2 in processHandlePairs)
2309 {
2310 List<Exception> list2 = item2.Item1.KillTree(item2.Item2);
2311 if (list2 != null)
2312 {
2313 (list ?? (list = new List<Exception>())).AddRange(list2);
2314 }
2315 }
2316 return list;
2317 }
2318 finally
2319 {
2320 foreach (var item3 in processHandlePairs)
2321 {
2322 item3.Item1.Dispose();
2323 item3.Item2.Dispose();
2324 }
2325 }
2326 }
void AddRange(IEnumerable< KeyValuePair< TKey, TValue > > collection)
List<(Process Process, SafeProcessHandle Handle)> GetProcessHandlePairs(Func< Process, Process, bool > predicate)
Definition Process.cs:2328

References System.Diagnostics.Process.Process(), System.Collections.Generic.Dictionary< TKey, TValue >.AddRange(), System.Runtime.Serialization.Dictionary, System.Diagnostics.Process.GetProcessHandlePairs(), System.item, System.Diagnostics.Process.Kill(), and System.list.