示例#1
0
        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);
        }
示例#2
0
        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);
        }