Пример #1
0
        public void RunAnalyzing()
        {
            var allSeasons      = leagueRepo.GetAllLeagueSeasons(leagueRepo.GetLaLiga());
            var analyzedSeasons = systemRepo.GetTeamFormAnalyzedSeasons();

            foreach (var season in allSeasons)
            {
                var analyzedSeasonId = analyzedSeasons.FindIndex(s => s.LeagueSeasonId == season.LeagueSeasonId);
                if (analyzedSeasonId >= 0 && analyzedSeasons[analyzedSeasonId].AnalysisFinished)
                {
                    Console.WriteLine($"Season {season.LeagueSeasonId} already analyzed.");
                    continue;
                }
                var seasonTeams = analysisRepo.GetSeasonTeams(season.LeagueSeasonId);

                foreach (var team in seasonTeams)
                {
                    AnalyzedTeam(team);
                }

                if (season.EndDate < DateTime.Now)
                {
                    systemRepo.AddAnalyzedSeasons_TeamForm(season.LeagueSeasonId);
                }
            }
        }
Пример #2
0
        public void RunAnalyzing()
        {
            var allSeasons = leagueRepo.GetAllLeagueSeasons(leagueRepo.GetLaLiga());

            foreach (var season in allSeasons)
            {
                Console.WriteLine($"Start analyzing league season: {season.LeagueSeasonId} [{season.StartYear}-{season.StartYear + 1}] .");
                AnalyzeLeagueSeason(season);
                Console.WriteLine($"Finish analyzing");
            }
        }
Пример #3
0
        public void RunAnalyzing()
        {
            var allSeasons = leagueRepo.GetAllLeagueSeasons(leagueRepo.GetLaLiga());

            foreach (var season in allSeasons)
            {
                var seasonStats = analysisRepo.GetSeasonStats(season.LeagueSeasonId);
                if (seasonStats.GamePlayed < 380)
                {
                    AnalyzeLeagueSeason(seasonStats);
                }
                else
                {
                    Console.WriteLine($"Season: {season.LeagueSeasonId} [{season.StartYear}-{season.StartYear + 1}] have been already analyzed. Skip.");
                }
                UpdateLeagueSeason(season);
            }
        }
Пример #4
0
        public void RunAnalyzing()
        {
            var allSeasons      = leagueRepo.GetAllLeagueSeasons(leagueRepo.GetLaLiga());
            var analyzedSeasons = systemRepo.GetAverageRoundStatsAnalyzedSeasons();

            foreach (var season in allSeasons)
            {
                var analyzedSeasonId = analyzedSeasons.FindIndex(s => s.LeagueSeasonId == season.LeagueSeasonId);
                if (analyzedSeasonId >= 0 && analyzedSeasons[analyzedSeasonId].AnalysisFinished)
                {
                    Console.WriteLine($"Season {season.LeagueSeasonId} already analyzed.");
                    continue;
                }

                var isSeasonFinished = AnalyzeLeagueSeason(season);

                if (season.EndDate < DateTime.Now && isSeasonFinished)
                {
                    systemRepo.AddAnalyzedSeasons_AverageRoundStats(season.LeagueSeasonId);
                }
            }
        }