protected void OnScanningCompleted(ScanningCompletedEventArgs e) { if (ScanningCompleted != null) { ScanningCompleted(this, e); } }
public ScanningCompletedEventArgs Analyze() { if (write_html_report && string.IsNullOrEmpty(html_report_path)) { throw new InvalidOperationException("WriteHtmlReport is true but HtmlReportPath is not set."); } if (write_xml_report && string.IsNullOrEmpty(xml_report_path)) { throw new InvalidOperationException("WriteXmlReport is true but XmlReportPath is not set."); } // Reset our totals count todo_total = 0; niex_total = 0; miss_total = 0; pinv_total = 0; BeginReports(); // We have to do this first, so we can find methods that // call pinvoke methods in the next step. foreach (string assem in assemblies) { ScanAssemblyForPInvokes(assem); } // Scan each assembly for issues, raise event with results foreach (string assem in assemblies) { AnalyzeAssembly(assem); todo_total += mono_todo_results.Count; niex_total += not_implemented_results.Count; miss_total += missing_results.Count; pinv_total += pinvoke_results.Count; AssemblyScannedEventArgs asea = new AssemblyScannedEventArgs(assem, AssemblyRuntime, assembly_version, mono_todo_results, not_implemented_results, missing_results, pinvoke_results); OnAssemblyScanned(asea); AddAssemblyToReport(asea); mono_todo_results.Clear(); not_implemented_results.Clear(); missing_results.Clear(); pinvoke_results.Clear(); } // All done! ScanningCompletedEventArgs scea = new ScanningCompletedEventArgs(assemblies.Count, todo_total, niex_total, miss_total, pinv_total); OnScanningCompleted(scea); FinishReports(scea); return(scea); }
private void FinishReports(ScanningCompletedEventArgs e) { if (write_html_report) { r.EndReport(e.MissingMethodTotal, e.NotImplementedExceptionTotal, e.MonoTodoTotal, e.PInvokeTotal); } if (write_xml_report) { xr.EndReport(); } }