예제 #1
0
        public int SendReports(int clientId)
        {
            var reports = _reportBuilder.BuildReports(clientId).ToList();

            if (reports.Count == 0)
            {
                var specialReport = _reportBuilder.BuildSpecialReport();
                _reportSender.Send(specialReport);
            }
            else
            {
                foreach (var report in reports)
                {
                    _reportSender.Send(report);
                }
            }

            return(reports.Count);
        }