public static CatalogExcursionRanking Create(ExcursionRank rank, string language)
 {
     if (rank == null)
     {
         throw new ArgumentNullException("rank");
     }
     CatalogExcursionRanking ranking = new CatalogExcursionRanking {
         count = rank.SurveyCount
     };
     decimal? averageRank = rank.AverageRank;
     ranking.average = averageRank.HasValue ? new decimal?(Math.Round(rank.AverageRank.Value, 1, MidpointRounding.AwayFromZero)) : null;
     ranking.BuildAverageTitle(language);
     return ranking;
 }
        public static CatalogExcursionRanking Create(ExcursionRank rank, string language)
        {
            if (rank == null)
            {
                throw new ArgumentNullException("rank");
            }
            CatalogExcursionRanking ranking = new CatalogExcursionRanking {
                count = rank.SurveyCount
            };
            decimal?averageRank = rank.AverageRank;

            ranking.average = averageRank.HasValue ? new decimal?(Math.Round(rank.AverageRank.Value, 1, MidpointRounding.AwayFromZero)) : null;
            ranking.BuildAverageTitle(language);
            return(ranking);
        }