public void AddErrors(IEnumerable <DisplayError> result, string projectName, string fileName)
        {
            var snapshot = new TableEntriesSnapshot(result, projectName, fileName);

            Snapshots[fileName] = snapshot;

            UpdateAllSinks();
        }
Exemple #2
0
        internal void RemoveSnapshots(IEnumerable <string> urls)
        {
            foreach (string url in urls)
            {
                TableEntriesSnapshot existing = _snapshots.Find(s => s.Url == url);

                if (existing != null)
                {
                    _snapshots.Remove(existing);
                    _sink.RemoveSnapshot(existing);
                }
            }
        }
Exemple #3
0
        internal void UpdateSink(IEnumerable <TableEntriesSnapshot> snapshots)
        {
            foreach (TableEntriesSnapshot snapshot in snapshots)
            {
                TableEntriesSnapshot existing = _snapshots.Find(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];
                snapshot?.Dispose();
            }

            Snapshots.Clear();

            lock (_managers)
            {
                foreach (SinkManager manager in _managers)
                {
                    manager.Clear();
                }
            }

            UpdateAllSinks();
        }