public string GenerateHtmlReport(string fileName) { var riskAnalyzer = new ContentRiskAnalyzer(); riskAnalyzer.ShowSummary = _bShow; riskAnalyzer.Analyse(fileName); string htmlReport = riskAnalyzer.GetHtmlContent(); _reportXml = string.Join("", riskAnalyzer.GetXml()); return htmlReport; }
public string GenerateHtmlReportFile(string fileName, string displayName, out string xmlReport) { ContentRiskAnalyzer riskAnalyzer = new ContentRiskAnalyzer(); riskAnalyzer.ShowSummary = true; riskAnalyzer.DisplayName = displayName; riskAnalyzer.Analyse(fileName); string htmlReportFile = riskAnalyzer.GenerateHtmlFile(); xmlReport = string.Join("", riskAnalyzer.GetXml()); return htmlReportFile; }
public string GenerateXmlReportFile(string fileName, string displayName) { ContentRiskAnalyzer riskAnalyzer = new ContentRiskAnalyzer(); riskAnalyzer.ShowSummary = true; riskAnalyzer.DisplayName = displayName; riskAnalyzer.Analyse(fileName); string[] xml = riskAnalyzer.GetXml(); string sXml = xml.Length > 0 ? xml[0] : "<?xml version=\"1.0\"?>\r\n<Metadata/>"; string tempPath = null; using (StreamWriter sw = riskAnalyzer.GetWriterForTempFile(out tempPath, "xml")) { sw.Write(sXml); } return tempPath; }