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); }
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); }