Add bound breakpoint param eter to binding and unbinding events.

This commit is contained in:
Julius Trinkunas 2013-02-15 12:59:38 +02:00
Родитель 82764f7679
Коммит 2ccc8cda18
2 изменённых файлов: 6 добавлений и 6 удалений

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

@ -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;
}
}