コード例 #1
0
        public List <FunctionRankResult> GetFunctionRank(FunctionRankParms parms)
        {
            List <FunctionRankResult> functionRankResults = GetActualFunctionRank();
            var orderedFunctionRanks = SetOrder(functionRankResults, parms);

            return(orderedFunctionRanks);
        }
コード例 #2
0
 private List <FunctionRankResult> SetOrder(List <FunctionRankResult> functionRankResults, FunctionRankParms query)
 {
     if (query.RankByAlphabet == 1)
     {
         return(functionRankResults.OrderBy(x => x.name).ToList());
     }
     else
     {
         return(functionRankResults.OrderByDescending(x => x.value).ToList());
     }
 }