System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.ThrowUnresolvableFunction C# (CSharp) Method

ThrowUnresolvableFunction() private static method

Helper method for FindFunction
private static ThrowUnresolvableFunction ( Expression Expression ) : void
Expression System.Linq.Expressions.Expression
return void
        private static void ThrowUnresolvableFunction(Expression Expression)
        {
            if (Expression.NodeType
                == ExpressionType.Call)
            {
                var methodInfo = ((MethodCallExpression)Expression).Method;
                throw new NotSupportedException(Strings.ELinq_UnresolvableFunctionForMethod(methodInfo, methodInfo.DeclaringType));
            }
            else if (Expression.NodeType
                     == ExpressionType.MemberAccess)
            {
                string memberName;
                Type memberType;
                var memberInfo = TypeSystem.PropertyOrField(((MemberExpression)Expression).Member, out memberName, out memberType);
                throw new NotSupportedException(Strings.ELinq_UnresolvableFunctionForMember(memberInfo, memberInfo.DeclaringType));
            }
            throw new NotSupportedException(Strings.ELinq_UnresolvableFunctionForExpression(Expression.NodeType));
        }