示例#1
0
 public override void VisitMethodInvocationExpression(MethodInvocationExpression node)
 {
     if (this.IsGetCurrent(node))
     {
         this.set_ResultingType(node.get_ExpressionType());
     }
     this.VisitMethodInvocationExpression(node);
     return;
 }
            private LinqQueryExpression ProcessExtensionMethodChain(IEnumerable <MethodInvocationExpression> methodInvocations, MethodInvocationExpression topInvoke, bool queryable)
            {
                this.currentIdentifier = null;
                this.clauses.Clear();
                V_0 = methodInvocations.GetEnumerator();
                try
                {
                    while (true)
                    {
                        if (V_0.MoveNext())
                        {
                            V_1 = V_0.get_Current();
                            V_2 = true;
                            V_3 = V_1.get_MethodExpression().get_MethodDefinition().get_Name();
                            if (V_3 == null)
                            {
                                break;
                            }
                            if (String.op_Equality(V_3, "Select"))
                            {
                                V_2 = this.TryProcessSelectMethod(V_1, queryable);
                            }
                            else
                            {
                                if (String.op_Equality(V_3, "SelectMany"))
                                {
                                    V_2 = this.TryProcessSelectManyMethod(V_1, queryable);
                                }
                                else
                                {
                                    if (String.op_Equality(V_3, "Where"))
                                    {
                                        V_2 = this.TryProcessWhereMethod(V_1, queryable);
                                    }
                                    else
                                    {
                                        if (String.op_Equality(V_3, "OrderBy"))
                                        {
                                            V_2 = this.TryProcessOrderByMethod(V_1, true, queryable);
                                        }
                                        else
                                        {
                                            if (String.op_Equality(V_3, "OrderByDescending"))
                                            {
                                                V_2 = this.TryProcessOrderByMethod(V_1, false, queryable);
                                            }
                                            else
                                            {
                                                if (String.op_Equality(V_3, "ThenBy"))
                                                {
                                                    V_2 = this.TryProcessThenByMethod(V_1, true, queryable);
                                                }
                                                else
                                                {
                                                    if (String.op_Equality(V_3, "ThenByDescending"))
                                                    {
                                                        V_2 = this.TryProcessThenByMethod(V_1, false, queryable);
                                                    }
                                                    else
                                                    {
                                                        if (String.op_Equality(V_3, "Join"))
                                                        {
                                                            V_2 = this.TryProcessJoinMethod(V_1, false, queryable);
                                                        }
                                                        else
                                                        {
                                                            if (String.op_Equality(V_3, "GroupJoin"))
                                                            {
                                                                V_2 = this.TryProcessJoinMethod(V_1, true, queryable);
                                                            }
                                                            else
                                                            {
                                                                if (!String.op_Equality(V_3, "GroupBy"))
                                                                {
                                                                    break;
                                                                }
                                                                V_2 = this.TryProcessGroupByMethod(V_1, queryable);
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                            if (!V_2)
                            {
                                V_5 = null;
                                goto Label1;
                            }
                        }
                        else
                        {
                            goto Label0;
                        }
                    }
                    V_5 = null;
                }
                finally
                {
                    if (V_0 != null)
                    {
                        V_0.Dispose();
                    }
                }
Label1:
                return(V_5);

Label0:
                if (this.clauses.get_Count() == 0)
                {
                    return(null);
                }
                if (this.currentIdentifier != null)
                {
                    this.clauses.Add(new SelectClause(new VariableReferenceExpression(this.currentIdentifier, null), null));
                }
                return(new LinqQueryExpression(new List <QueryClause>(this.clauses), topInvoke.get_ExpressionType(), null));
            }