Example #1
0
        public void PostUpdate(IssueUpdateData Update)
        {
            bool bUpdatedIssues;

            lock (LockObject)
            {
                PendingUpdates.Add(Update);
                bUpdatedIssues = ApplyPendingUpdate(Issues, Update);
            }

            RefreshEvent.Set();

            if (bUpdatedIssues)
            {
                OnIssuesChanged?.Invoke();
            }
        }
        public void Accept(string path, IEnumerable <IAnalysisIssue> issues)
        {
            // Callback from the daemon when new results are available
            if (path != analysisFilePath)
            {
                Debug.Fail("Issues returned for an unexpected file path");
                return;
            }

            Debug.Assert(issues.All(IsIssueInAnalysisSnapshot), "Not all reported issues could be mapped to the analysis snapshot");

            var newIssues = issues
                            .Where(IsIssueInAnalysisSnapshot)
                            .Select(x => issueToIssueVisualizationConverter.Convert(x, analysisSnapshot))
                            .ToArray();

            allIssues.AddRange(newIssues);

            onIssuesChanged.Invoke(allIssues);
        }