/// <summary> /// Look up the method info. /// </summary> /// <param name="className">The class name of the class to get method info about</param> /// <param name="theMethodName">The method name</param> /// <param name="argClassList">The argument types.</param> /// <param name="caller">The calling evaluator.</param> /// <returns>The method info for the method.</returns> protected static MethodInfo GetMethodInfo( string className, string theMethodName, Type[] argClassList, Evaluator caller) { // TODO use caller to get line number caller.FindLineNumberInCallStack(); try { Type cls = className.ToClass(); if (cls == null) { ErrorHandlers.ClrError(string.Format("Can't find class: {0} at line {1}", className, caller.FindLineNumberInCallStack())); return null; } MethodInfo info = cls.GetMethod(theMethodName, argClassList); if (info == null) { ErrorHandlers.ClrError(string.Format("Can't find method: {0}:{1} at line {2}", className, theMethodName, caller.FindLineNumberInCallStack())); return null; } return info; } catch (TypeLoadException) { ErrorHandlers.ClrError(string.Format("Bad class, can't load: {0} at line {1}", className, caller.FindLineNumberInCallStack())); return null; } }