Example #1
0
        public void SendReports()
        {
            IList <Report> reports = reportBuilder.CreateReports();

            foreach (Report report in reports)
            {
                reportSender.Send(report);
            }
        }
Example #2
0
        public void SendReports()
        {
            IList <Report> reports = reportbuilder.CreateReports();

            if (reports.Count == 0)
            {
                throw new Exception();
            }
            foreach (Report report in reports)
            {
                reportSender.Send(report);
            }
        }
        public void SendReports()
        {
            IList <Report> reports = _reportBuilder.CreateReports();

            if (reports.Count == 0)
            {
                throw new NoReportsException();
            }

            foreach (var report in reports)
            {
                _reportSender.Send(report);
            }
        }
Example #4
0
        public int SendReports()
        {
            IList <Report> reports = _reportBuilder.CreateReports();

            if (HasNoReports(reports))
            {
                _reportSender.Send(_reportBuilder.CreateSpecialReport());
            }

            foreach (var report in reports)
            {
                _reportSender.Send(report);
            }
            return(reports.Count);
        }