/// <summary> /// Creates a new scanner. /// </summary> /// <param name="analysisTypes">The types of the analyses to include.</param> /// <param name="reportFile">The file where the report should be written to.</param> /// <param name="progressCallback">Callback function to report the analysis progress. <code>null</code> if no progress should be reported.</param> /// <returns>A scanner instance.</returns> public static Scanner Create(Type[] analysisTypes, string reportFile, Action <string> progressCallback) { var runner = AnalysisRunner.Create(analysisTypes); var stream = File.CreateText(reportFile); stream.WriteLine($"File{ColumnSeperator}Line{ColumnSeperator}Reported"); return(new Scanner(runner, stream, progressCallback)); }
private Scanner(AnalysisRunner runner, StreamWriter reportStream, Action <string> progressCallback) { _runner = runner; _reportStream = reportStream; _progressCallback = progressCallback; }