public AlgorithmResult Execute()
        {
            var designers = _designersRepository.GetAll();

            SetInitialAllocatedArtists(designers);
            var artists = _artistsRepository.GetAll();

            var commonArtists = GetCommonModels(designers);

            var stopWatch = new Stopwatch();

            stopWatch.Start();
            var result = DescendingDemand(designers, commonArtists);

            stopWatch.Stop();

            return(new AlgorithmResult
            {
                Designers = result,
                Score = FinalScore(result),
                TimeExecuted = stopWatch.Elapsed.TotalMilliseconds
            });
        }
コード例 #2
0
        public IEnumerable <Designer> GetAll()
        {
            var result = _designersRepository.GetAll();

            return(result);
        }