Add bound breakpoint param eter to binding and unbinding events.
This commit is contained in:
Родитель
82764f7679
Коммит
2ccc8cda18
|
@ -15,8 +15,8 @@ namespace Debugger
|
|||
private readonly Dictionary<IBreakpoint, IBreakpoint> breakpoints = new Dictionary<IBreakpoint, IBreakpoint> ();
|
||||
public IList<IBreakpoint> Breakpoints { get { return new ReadOnlyCollection<IBreakpoint> (breakpoints.Keys.ToList ());}}
|
||||
|
||||
public event Action<IBreakpoint, ILocation> BreakpointBound;
|
||||
public event Action<IBreakpoint, ILocation> BreakpointUnbound;
|
||||
public event Action<IBreakpoint, IBreakpoint, ILocation> BreakpointBound;
|
||||
public event Action<IBreakpoint, IBreakpoint, ILocation> BreakpointUnbound;
|
||||
|
||||
|
||||
public IBreakpoint this[int index] { get { return breakpoints.Keys.ElementAt (index); } }
|
||||
|
@ -137,7 +137,7 @@ namespace Debugger
|
|||
breakpoints[bp.Key] = b;
|
||||
b.Enable ();
|
||||
if (BreakpointBound != null)
|
||||
BreakpointBound (bp.Key, b.Location);
|
||||
BreakpointBound (bp.Key, b, b.Location);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ namespace Debugger
|
|||
var bps = breakpoints.Where (x => typeMirror.SourceFiles.Contains(x.Value.Location.SourceFile)).ToArray ();
|
||||
foreach (var bp in bps) {
|
||||
if (BreakpointUnbound != null)
|
||||
BreakpointUnbound (bp.Key, bp.Value.Location);
|
||||
BreakpointUnbound (bp.Key, bp.Value, bp.Value.Location);
|
||||
breakpoints.Remove (bp.Key);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace Debugger
|
|||
|
||||
int IndexOf (IBreakpoint breakpoint);
|
||||
|
||||
event Action<IBreakpoint, ILocation> BreakpointBound;
|
||||
event Action<IBreakpoint, ILocation> BreakpointUnbound;
|
||||
event Action<IBreakpoint, IBreakpoint, ILocation> BreakpointBound;
|
||||
event Action<IBreakpoint, IBreakpoint, ILocation> BreakpointUnbound;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче