System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.ThrowUnresolvableFunctionOverload C# (CSharp) 메소드

ThrowUnresolvableFunctionOverload() 개인적인 정적인 메소드

Helper method for FindCanonicalFunction
private static ThrowUnresolvableFunctionOverload ( Expression Expression, bool isAmbiguous ) : void
Expression System.Linq.Expressions.Expression
isAmbiguous bool
리턴 void
        private static void ThrowUnresolvableFunctionOverload(Expression Expression, bool isAmbiguous)
        {
            if (Expression.NodeType
                == ExpressionType.Call)
            {
                var methodInfo = ((MethodCallExpression)Expression).Method;
                if (isAmbiguous)
                {
                    throw new NotSupportedException(
                        Strings.ELinq_UnresolvableFunctionForMethodAmbiguousMatch(methodInfo, methodInfo.DeclaringType));
                }
                else
                {
                    throw new NotSupportedException(
                        Strings.ELinq_UnresolvableFunctionForMethodNotFound(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_UnresolvableStoreFunctionForMember(memberInfo, memberInfo.DeclaringType));
            }
            throw new NotSupportedException(Strings.ELinq_UnresolvableStoreFunctionForExpression(Expression.NodeType));
        }