public WarningIterator ReportIterator() { WarningCollection reportCollection = new WarningCollection(); Report[] reports = db.GetReports(); for (int i = 0; i < reports.Length; i++) { reportCollection[i] = new Warning(reports[i]); } WarningIterator reportIterator = reportCollection.CreateIterator() as WarningIterator; return(reportIterator); }
public WarningIterator AlertIterator() { WarningCollection alertCollection = new WarningCollection(); Alert[] alerts = db.GetAlerts(); for (int i = 0; i < alerts.Length; i++) { alertCollection[i] = new Warning(alerts[i]); } WarningIterator alertIterator = alertCollection.CreateIterator() as WarningIterator; return(alertIterator); }