IReadOnlyList <Protocol.Breakpoint> IBreakpoints.SetBreakpoints(Protocol.Source source, IReadOnlyList <Protocol.SourceBreakpoint> sourceBreakpoints) { lock (gate) { var path = source.Path; foreach (var row in rows.Items) { if (row.FunctionBreakpoint == null && PathEquals(row.Source.Path, path)) { rows.Remove(row); } } var breakpoints = new List <Protocol.Breakpoint>(sourceBreakpoints.Count); foreach (var sourceBreakpoint in sourceBreakpoints) { var row = new Row(source, sourceBreakpoint); TryUpdate(row); breakpoints.Add(row.Breakpoint); } RebuildItems(); return(breakpoints); } }
public Row(Protocol.Source source, Protocol.SourceBreakpoint sourceBreakpoint) { Source = source; SourceBreakpoint = sourceBreakpoint; }