Inheritance: IDealershipAssessment
Example #1
0
        private List <DealershipPerformanceStatus> BuildStatuses(IEnumerable <Dealership> dealerships, DateTime start, DateTime end)
        {
            var statuses = new List <DealershipPerformanceStatus>();

            foreach (var dealership in dealerships)
            {
                var status   = new DealershipPerformanceStatus();
                var mediator = new DealershipAssessmentMediator(status); // Mediator wraps status

                var targets = provider.Get(dealership, start, end);
                var actuals = calculator.CalculateFor(dealership, start, end);

                // pass in the mediator, so private data can be set on the media
                targets.Populate(mediator);
                actuals.Populate(mediator);

                statuses.Add(status); // values will have been set by the mediator when passed into domain objects
            }
            return(statuses);
        }
        private List<DealershipPerformanceStatus> BuildStatuses(IEnumerable<Dealership> dealerships, DateTime start, DateTime end)
        {
            var statuses = new List<DealershipPerformanceStatus>();
            foreach (var dealership in dealerships)
            {
                var status = new DealershipPerformanceStatus();
                var mediator = new DealershipAssessmentMediator(status); // Mediator wraps status

                var targets = provider.Get(dealership, start, end);
                var actuals = calculator.CalculateFor(dealership, start, end);

                // pass in the mediator, so private data can be set on the media
                targets.Populate(mediator);
                actuals.Populate(mediator);

                statuses.Add(status); // values will have been set by the mediator when passed into domain objects
            }
            return statuses;
        }