private bool TryProcessSelectManyMethod(MethodInvocationExpression methodInvoke, bool queryable) { V_0 = methodInvoke.get_MethodExpression().get_MethodDefinition(); if (V_0.get_Parameters().get_Count() != 3) { return(false); } V_1 = this.GetFuncGenericInstance(V_0.get_Parameters().get_Item(1).get_ParameterType() as GenericInstanceType, queryable); if (V_1 == null || V_1.get_GenericArguments().get_Count() != 2) { return(false); } V_2 = this.GetLambdaExpression(methodInvoke.get_Arguments().get_Item(1), queryable); if (V_2 == null || V_2.get_Arguments().get_Count() != 1) { return(false); } this.ProcessCurrentIdentifier(methodInvoke.get_Arguments().get_Item(0), V_2.get_Parameters()[0].Resolve()); stackVariable48 = new VariableReference[1]; stackVariable48[0] = this.currentIdentifier; V_3 = this.ProcessReturnExpression(V_2, stackVariable48); if (V_3 == null) { return(false); } V_4 = this.GetLambdaExpression(methodInvoke.get_Arguments().get_Item(2), queryable); if (V_4 == null || V_4.get_Arguments().get_Count() != 2) { return(false); } V_5 = this.CreateNewIdentifier(V_4.get_Parameters()[1].get_Name(), V_4.get_Parameters()[1].get_ParameterType()); stackVariable82 = new VariableReference[2]; stackVariable82[0] = this.currentIdentifier; stackVariable82[1] = V_5; V_6 = this.ProcessReturnExpression(V_4, stackVariable82); if (V_6 == null) { return(false); } V_7 = this.GetIdentifierReference(V_5, ref V_3); this.clauses.Add(new FromClause(V_7, V_3, null)); this.clauses.Add(new SelectClause(V_6, methodInvoke.get_InvocationInstructions())); this.currentIdentifier = null; return(true); }
private bool TryProcessGroupByMethod(MethodInvocationExpression methodInvoke, bool queryable) { V_0 = methodInvoke.get_MethodExpression().get_MethodDefinition(); if (V_0.get_Parameters().get_Count() > 3 || V_0.get_Parameters().get_Count() != V_0.get_GenericParameters().get_Count() || V_0.get_GenericParameters().get_Count() == 3 && String.op_Inequality(V_0.get_GenericParameters().get_Item(2).get_Name(), "TElement")) { return(false); } V_1 = this.GetLambdaExpression(methodInvoke.get_Arguments().get_Item(1), queryable); if (V_1 == null || V_1.get_Arguments().get_Count() != 1) { return(false); } this.ProcessCurrentIdentifier(methodInvoke.get_Arguments().get_Item(0), V_1.get_Parameters()[0].Resolve()); stackVariable44 = new VariableReference[1]; stackVariable44[0] = this.currentIdentifier; V_2 = this.ProcessReturnExpression(V_1, stackVariable44); if (V_2 == null) { return(false); } if (methodInvoke.get_Arguments().get_Count() != 3) { V_3 = new VariableReferenceExpression(this.currentIdentifier, null); } else { V_4 = this.GetLambdaExpression(methodInvoke.get_Arguments().get_Item(2), queryable); if (V_4 == null || V_4.get_Arguments().get_Count() != 1) { return(false); } stackVariable84 = new VariableReference[1]; stackVariable84[0] = this.currentIdentifier; V_3 = this.ProcessReturnExpression(V_4, stackVariable84); if (V_3 == null) { return(false); } } this.clauses.Add(new GroupClause(V_3, V_2, methodInvoke.get_InvocationInstructions())); this.currentIdentifier = null; return(true); }