Esempio n. 1
0
        public static Report Create(ReportTypes reportTypes)
        {
            Report report = null;

            if (reportTypes.Equals(ReportTypes.CSV))
            {
                report = new ReportCSV();
                return(report);
            }
            else if (reportTypes.Equals(ReportTypes.Json))
            {
                report = new ReportJSON();
                return(report);
            }
            return(report);
        }
Esempio n. 2
0
        public static Report Create(string type)
        {
            Report report = null;

            if (type.Equals(ReportTypes.CSV.ToString()))
            {
                report = new ReportCSV();
                return(report);
            }
            else if (type.Equals(ReportTypes.Json.ToString()))
            {
                report = new ReportJSON();
                return(report);
            }
            return(report);
        }