System.Linq.Expressions.Expression.ApplyTypeArgs C# (CSharp) Method

ApplyTypeArgs() private static method

private static ApplyTypeArgs ( MethodInfo m, Type typeArgs ) : MethodInfo
m System.Reflection.MethodInfo
typeArgs Type
return System.Reflection.MethodInfo
        private static MethodInfo ApplyTypeArgs(MethodInfo m, Type[] typeArgs)
        {
            if (typeArgs == null || typeArgs.Length == 0)
            {
                if (!m.IsGenericMethodDefinition)
                    return m;
            }
            else
            {
                if (m.IsGenericMethodDefinition && m.GetGenericArguments().Length == typeArgs.Length)
                    return m.MakeGenericMethod(typeArgs);
            }
            return null;
        }
Expression