コード例 #1
0
        public void AddErrors(IEnumerable <ParseItem> result, string projectName, string fileName)
        {
            var snapshot = new TableEntriesSnapshot(result, projectName, fileName);

            _snapshots[fileName] = snapshot;

            UpdateAllSinks();
        }
コード例 #2
0
        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);
                }
            }
        }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
        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();
        }