private ClassCollection GetClassCollection() { ClassCollection classCollection=new ClassCollection(); Type[] types=assembly.GetTypes(); foreach (Type type in types) { if (type.IsClass) { MethodInfo[] methods=type.GetMethods(Options.BindingFlags); foreach (MethodInfo methodInfo in methods) { if (methodInfo.DeclaringType.Namespace==namespaceName) { string className=StringHelpers.RightOfRightmostOf(methodInfo.DeclaringType.FullName, '.'); Type t=methodInfo.DeclaringType; classCollection.Add(className, new ClassItem(assembly, namespaceName, className, type)); } } } } return classCollection; }
public void LoadClasses() { classCollection=GetClassCollection(); classCollection.DumpKeys("Namespace: "+namespaceName+", Classes:"); }