private static void CreateExcelReport(string filePathInfo) { var excelGen = new ExcelReportWriter(); var helper = new FilePathHelper(filePathInfo); excelGen.CreateReport(helper.FilePath, helper.FileName); }
// Should all writers implement interfaces because now we don't follow DRY principle. private static void CreateJSONReport(string filePathInfo) { var jsonGen = new JSONReportWriter(); var helper = new FilePathHelper(filePathInfo); jsonGen.CreateReport(helper.FilePath, helper.FileName); }
private static void CreateXMLReport(string filePathInfo) { var xmlGen = new XmlReportWriter(); var helper = new FilePathHelper(filePathInfo); xmlGen.CreateReport(helper.FilePath, helper.FileName); }
private static void CreatePDFReport(string filePathInfo) { var pdfGen = new PdfReportWriter(); var helper = new FilePathHelper(filePathInfo); pdfGen.CreateReport(helper.FilePath, helper.FileName); }