コード例 #1
0
            private bool TryProcessThenByMethod(MethodInvocationExpression methodInvoke, bool ascending, bool queryable)
            {
                Expression key;

                if (!TryProcessSingleParameterQuery(methodInvoke, false, queryable, out key))
                {
                    return(false);
                }

                OrderByClause orderBy = clauses[clauses.Count - 1] as OrderByClause;

                if (orderBy == null)
                {
                    return(false);
                }
                orderBy.ExpressionToOrderDirectionMap.Add(key, ascending ? OrderDirection.Ascending : OrderDirection.Descending);
                clauses[clauses.Count - 1] = orderBy.CloneAndAttachInstructions(methodInvoke.InvocationInstructions) as QueryClause;
                return(true);
            }