コード例 #1
0
 static private KeySkillStats GetSkillWithStats(Key_Skills skill, List <HHVacancyModel> vacanciesHasSkill, int allVacanciesCnt)
 {
     return(new KeySkillStats()
     {
         KeySkill = skill,
         Price = SalaryInfo.GetAverageSalary(vacanciesHasSkill),
         FrequencyInPercent = decimal.Divide(vacanciesHasSkill.Count, allVacanciesCnt) * 100
     });
 }
コード例 #2
0
        public decimal GetAverageRegionSalary(int areaId)
        {
            var vacs = _vacancyDataHandlerService.GetRegionVacancies(_vacancyDataHandlerService.GetVacanciesWithSalary(_vacancyService.Vacancies), areaId);

            if (!vacs.Any())
            {
                return(-1);
            }
            return(SalaryInfo.GetAverageSalary(vacs));
        }
コード例 #3
0
 public decimal GetAverageSalary([FromServices] IVacancyDataHandlerService service)
 {
     return(SalaryInfo.GetAverageSalary(service.GetVacanciesWithSalary(_vacancyService.Vacancies)));
 }