.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

34 lines
875 B

// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using Debugger.Interop.CorDebug;
namespace Debugger
{
public class ProcessCollection: CollectionWithEvents<Process>
{
public ProcessCollection(NDebugger debugger): base(debugger) {}
internal Process this[ICorDebugProcess corProcess] {
get {
foreach (Process process in this) {
if (process.CorProcess == corProcess) {
return process;
}
}
return null;
}
}
protected override void OnRemoved(Process item)
{
base.OnRemoved(item);
if (this.Count == 0) {
// Exit callback and then terminate the debugger
this.Debugger.MTA2STA.AsyncCall( delegate { this.Debugger.TerminateDebugger(); } );
}
}
}
}