Beispiel #1
0
            internal override Expression VisitMethodCall(MethodCallExpression m)
            {
                var flag = isTopLevel;

                try {
                    if (isTopLevel && !SubqueryRules.IsSupportedTopLevelMethod(m.Method))
                    {
                        throw System.Data.Linq.Error.SubqueryDoesNotSupportOperator(m.Method.Name);
                    }
                    isTopLevel = false;
                    return(base.VisitMethodCall(m));
                } finally {
                    isTopLevel = flag;
                }
            }
Beispiel #2
0
            internal override Expression VisitMethodCall(MethodCallExpression m)
            {
                bool was = isTopLevel;

                try {
                    if (isTopLevel && !SubqueryRules.IsSupportedTopLevelMethod(m.Method))
                    {
                        throw Error.SubqueryDoesNotSupportOperator(m.Method.Name);
                    }
                    isTopLevel = false;
                    return(base.VisitMethodCall(m));
                }
                finally {
                    isTopLevel = was;
                }
            }