public static ReportableDataProviding getDataSource(ReportDataSource reportDataSource) { ReportableDataProviding result = null; switch (reportDataSource) { case ReportDataSource.SCCM: result = new SccmReportableDataSource(); break; } return(result); }
public List <SoftwareInventoryTableEntry> runReport(InventoryProject projectContext) { List <SoftwareInventoryTableEntry> result = new List <SoftwareInventoryTableEntry>(); ReportableDataProviding reportableDataProvider = ReportDataSourceFactory.getDataSource(DataSource); foreach (SoftwareInventoryTableEntry softwareEntry in reportableDataProvider.getReportableData()) { bool include = true; foreach (ReportFilter filter in Filters) { if (filter.isFiltered(softwareEntry.Software, projectContext)) { include = false; break; } } if (include) { result.Add(softwareEntry); } } return(result); }