add event when breakpoint is bound

This commit is contained in:
Andreia Gaita 2013-02-08 16:44:13 +01:00
Родитель dd60fb3c95
Коммит 127aa2028c
2 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -12,7 +12,9 @@ namespace Debugger
{
private readonly ITypeProvider typeProvider;
private readonly Dictionary<IBreakpoint, IBreakpoint> breakpoints = new Dictionary<IBreakpoint, IBreakpoint> ();
public IDictionary<IBreakpoint, IBreakpoint> Breakpoints { get { return breakpoints; }}
public IDictionary<IBreakpoint, IBreakpoint> Breakpoints { get { return breakpoints; }}
public event Action<IBreakpoint> BreakpointBound;
[ImportingConstructor]
public BreakpointProvider (ITypeProvider typeProvider)
@ -97,6 +99,8 @@ namespace Debugger
var b = Factory.CreateBreakpoint (bestLocation);
breakpoints[bp.Key] = b;
b.Enable ();
if (BreakpointBound != null)
BreakpointBound (b);
break;
}
}

Просмотреть файл

@ -13,6 +13,7 @@ namespace Debugger
bool RemoveBreakpoint (IBreakpoint breakpoint);
bool RemoveBreakpoint (string file, int line);
IBreakpoint this [int index] { get; }
IBreakpoint this [int index] { get; }
event Action<IBreakpoint> BreakpointBound;
}
}