GetMatchingMethod() static private method

static private GetMatchingMethod ( MethodInfo method, Type declaring ) : MethodInfo
method System.Reflection.MethodInfo
declaring System.Type
return System.Reflection.MethodInfo
        private static MethodInfo ReplaceQueryableMethod(MethodInfo method)
        {
            MethodInfo matchingMethod = QueryableTransformer.GetMatchingMethod(method, QueryableTransformer.GetTargetDeclaringType(method));

            if (matchingMethod != null)
            {
                return(matchingMethod);
            }
            throw new InvalidOperationException(string.Format("There is no method {0} on type {1} that matches the specified arguments", method.Name, method.DeclaringType.FullName));
        }