public void RegisterAnalyzer(ISharperCryptoApiAnalysisAnalyzer analyzer) { var index = Analyzers.IndexOf(analyzer); if (index < 0) { ThreadHelper.Generic.BeginInvoke(() => Analyzers.Add(analyzer)); } else { ThreadHelper.Generic.BeginInvoke(() => Analyzers[index] = analyzer); } if (Settings.MutedAnalyzers.Contains((int)analyzer.AnalyzerId)) { analyzer.IsMuted = true; } foreach (var report in analyzer.SupportedReports) { if (report.Equals(AnalysisReport.EmptyReport)) { continue; } ThreadHelper.Generic.BeginInvoke(() => Reports.Add(report)); } }