public List <string> GetClothes(string cityName, DateTime datetime, int duration) { Station station = _stationRepository.GetStation(cityName); var parameters = new ClothingParameters(station, datetime, duration); return(CalculateClothes(parameters));; }
private List <string> CalculateClothes(ClothingParameters parameters) { var clothes = new List <string>(); if (parameters.Temperature < MAXTemperatureForWinterClothes) { clothes.AddRange(ClothesPackages.WinterClothes); } else if (parameters.Precipation > MINPrecipationForRainClothes) { clothes.AddRange(ClothesPackages.RainClothes); } else if (parameters.Temperature < MAXTemperatureForSpringClothes) { clothes.AddRange(ClothesPackages.SpringClothes); } else if (parameters.Temperature > MINTemperatureForSummerShoes) { clothes.AddRange(ClothesPackages.SummerShoes); } else { clothes.AddRange(ClothesPackages.BaseShoes); } if (parameters.Temperature < MAXTemperatureForSpringClothes) { clothes.AddRange(ClothesPackages.BaseClothes); } else { clothes.AddRange(ClothesPackages.SummerClothes); } return(clothes); }