foreach (MethodInfo method in type.GetMethods (BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance)) { if (type.Namespace != "Cocoa") { ExportAttribute eattr = (ExportAttribute) Attribute.GetCustomAttribute (method, typeof (ExportAttribute)); if (eattr != null) methods.Add (ObjCMethod.FromMethodInfo (method)); } else { methods.Add (ObjCMethod.FromMethodInfo (method)); } }