internal static void Analyze(LambdaExpression e, PathBox pb) { bool knownEntityType = CommonUtil.IsClientType(e.Body.Type); pb.PushParamExpression(e.Parameters.Last()); if (!knownEntityType) { NonEntityProjectionAnalyzer.Analyze(e.Body, pb); } else { switch (e.Body.NodeType) { case ExpressionType.MemberInit: EntityProjectionAnalyzer.Analyze((MemberInitExpression)e.Body, pb); break; case ExpressionType.New: throw new NotSupportedException(SR.ALinqCannotConstructKnownEntityTypes); case ExpressionType.Constant: throw new NotSupportedException(SR.ALinqCannotCreateConstantEntity); default: NonEntityProjectionAnalyzer.Analyze(e.Body, pb); break; } } pb.PopParamExpression(); }