private MethodCollection GetMethodCollection() { MethodCollection methodCollection=new MethodCollection(); Type[] types=assembly.GetTypes(); foreach (Type type in types) { MethodInfo[] methods=type.GetMethods(Options.BindingFlags); foreach (MethodInfo methodInfo in methods) { if (methodInfo.DeclaringType.Namespace==namespaceName) { string className=StringHelpers.RightOfRightmostOf(methodInfo.DeclaringType.FullName, '.'); if (className==this.className) { string methodName=methodInfo.Name; methodCollection.Add(methodName, new MethodItem(assembly, namespaceName, className, methodInfo)); } } } } return methodCollection; }
public void LoadMethods() { methodCollection=GetMethodCollection(); methodCollection.DumpKeys("Namespace: "+namespaceName+", Class: "+className+", Methods:"); }