예제 #1
0
        private static void CreateExcelReport(string filePathInfo)
        {
            var excelGen = new ExcelReportWriter();
            var helper   = new FilePathHelper(filePathInfo);

            excelGen.CreateReport(helper.FilePath, helper.FileName);
        }
예제 #2
0
        // 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);
        }
예제 #3
0
        private static void CreateXMLReport(string filePathInfo)
        {
            var xmlGen = new XmlReportWriter();
            var helper = new FilePathHelper(filePathInfo);

            xmlGen.CreateReport(helper.FilePath, helper.FileName);
        }
예제 #4
0
        private static void CreatePDFReport(string filePathInfo)
        {
            var pdfGen = new PdfReportWriter();
            var helper = new FilePathHelper(filePathInfo);

            pdfGen.CreateReport(helper.FilePath, helper.FileName);
        }