public List <SectorRankResult> GetSectorRank(SectorRankParms parms) { List <SectorRankResult> functionRankResults = GetActualSectorRank(); List <SectorRankResult> order = GetOrder(functionRankResults, parms); return(order); }
private List <SectorRankResult> GetOrder(List <SectorRankResult> functionRankResults, SectorRankParms parms) { if (parms.RankByResult == 1) { return(functionRankResults.OrderBy(x => x.value).ToList()); } else { return(functionRankResults.OrderBy(x => x.name).ToList()); } }