internal void Check(object state) { //abort threads quickly if cancel pressed if (!issueProcessor.shutdown) { if (IsIncluded()) { //exlusions only need to be tested if file is included if (!IsExcluded()) { try { // KaKTODO: 25.3.2011 (KaK) Take into account issueService.CalculationIsActive. // On large project solution analysis take several minutes and you are processing collection which is constantly modified foreach (CodeIssue issue in issueService.CheckCodeIssues(file)) { try { issueProcessor.AddCodeIssue(issue, file, GetFileTextRange(issue.Range)); } catch (Exception err) { Debug.Assert(false, "Failure During Checking Issue", String.Format("File: {0}{1}{2}{3}Issue: {4}", file, Environment.NewLine, err, Environment.NewLine, issue)); } } } catch (Exception err) { Debug.Assert(false, "Failure During issueService.CheckCodeIssues(file)", String.Format("File: {0}{1}{2}", file, Environment.NewLine, err)); } } } } issueProcessor.AddProcessedCount(); }