public void AddErrors(IEnumerable <ParseItem> result, string projectName, string fileName) { var snapshot = new TableEntriesSnapshot(result, projectName, fileName); _snapshots[fileName] = snapshot; UpdateAllSinks(); }
internal void RemoveSnapshots(IEnumerable <string> urls) { foreach (string url in urls) { TableEntriesSnapshot existing = _snapshots.FirstOrDefault(s => s.Url == url); if (existing != null) { _snapshots.Remove(existing); _sink.RemoveSnapshot(existing); } } }
internal void UpdateSink(IEnumerable <TableEntriesSnapshot> snapshots) { foreach (TableEntriesSnapshot snapshot in snapshots) { TableEntriesSnapshot existing = _snapshots.FirstOrDefault(s => s.Url == snapshot.Url); if (existing != null) { _snapshots.Remove(existing); _sink.ReplaceSnapshot(existing, snapshot); } else { _sink.AddSnapshot(snapshot); } _snapshots.Add(snapshot); } }
public void CleanAllErrors() { foreach (string url in _snapshots.Keys) { TableEntriesSnapshot snapshot = _snapshots[url]; if (snapshot != null) { snapshot.Dispose(); } } _snapshots.Clear(); lock (_managers) { foreach (SinkManager manager in _managers) { manager.Clear(); } } UpdateAllSinks(); }